Manage init scripts with chkconfig
chkconfig - updates and queries runlevel information for system services. See
man chkconfig(8) for the details.
Check your current configuration:
Change the startup information for services:
# Syntax: chkconfig [--level <levels>] <name> <on|off|reset> # enable vsftpd daemon to run in level 3, 4 and 5 chkconfig --level 345 vsftpd on # disable httpd: chkconfig --level 123456 httpd off
Add a new service for management by chkconfig:
chkconfig --add servicename
Runlevel and prority are taken from the init script. The init script should have an entry like this:
# chkconfig: 2345 20 80 # description: Saves and restores system entropy pool for \ # higher quality random number generation.
This says that the random script should be started in levels 2, 3, 4, and 5, that its start priority should be 20, and that its stop priority should be 80. You should be able to figure out what the description says; the \ causes the line to be continued. The extra space in front of the line is ignored.