After adding a new rc script to /etc/init.d/ on a RHEL 4 box last week, I was greeted with the following error when I ran chkconfig to create the /etc/rc0.d /etc/rc1.d /etc/rc2.d /etc/rc3.d /etc/rc4.d /etc/rc5.d /etc/rc6.d symbolic links:
$ /sbin/chkconfig llc2 on
service llc2 does not support chkconfig
After a big of poking around, it look like chkconfig looks for a line similar to the following in each run control script:
# chkconfig: 345 99 50
The values after the “chkconfig:” statement contain the runlevels to enable the script at, the value to use after the “S” in the start scripts, and the value to use after the “K” in the kill scripts. So 345 would cause the start script to be executed at run levels 3, 4 and 5, the start script would be named S99llc2, and the kill script would be named K50llc2. Shibby!