[CentOS] Init.d script troubleshooting.
lists at brimer.org
Wed Nov 10 02:07:34 UTC 2010
> On Nov 9, 2010, at 5:15 PM, Barry Brimer wrote:
>>> Testing the script, both via "/etc/init.d/Fast start" and "service Fast start" works, and it fully works for the implemented "start","stop","status" commands.
>>> "/etc/rc0.d/K10Fast stop" works as expected. (as does /etc/rc1,2,6 etc..)
>>> The script contains full paths to everything.
>>> At boot, the script functions as expected.
>>> My problem is that at reboot, via shutdown -r or shutdown -h the script does NOT get called, so naturally the system doesn't get to clean up after itself, then it fails to startup correctly next boot.
>> I believe the name of the script in /etc/init.d needs to match the name of
>> the lock file dropped in /var/lock/subsys .. so either change the case of
>> your lockfile so it is called "Fast" and not "fast" to match the script or
>> change the name of script to "fast" the match the lockfile. For further
>> reference, please examine /etc/init.d/killall. This is the script that
>> stops things that have placed files in /var/lock/subsys.
>> Hope this helps.
> Wow... It works now...
> Thanks much. I didn't see that in the documentation, interesting info.
Glad it works!
More information about the CentOS