[root@localhost /root]# rpm -q --scripts samba postinstall script (through /bin/sh): /sbin/chkconfig --add smb ...... [root@localhost /root]# chkconfig --add smb [root@localhost /root]# chkconfig --list smb smb 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@localhost /root]#
That's the correct behavior; it adds links for the default settings. To turn it on, do: chkconfig --level 345 smb on
Please explain the purpose of "chkconfig --add smb" in postinstall scripts. Does it mean that after rpm -i samba one needs to manually do chkconfig --level 345 smb?????
chkconfig --add adds the /etc/rc<foo>.d/links. If there are no links, it adds them in whatever the default state for the package is. samba defaults to off (as do most other things.) If the links already exist, it should leave them alone. chkconfig --del removes all the links, regardless of whether they are on or off. chkconfig --level x (on|off) changes the links to on or off.