I apologize, I messed up my explanation on a critical part of this. K scripts are also run when entering that runlevel, not at exit. You want to have your K script in the shutdown runlevel (runlevel 0) and the reboot level (runlevel 6).<br>
<br>I always convince myself of the way it should work and then look at my system to verify. I need to reverse that order.<br><br>Dan<br><br><div class="gmail_quote">On Wed, Mar 16, 2011 at 12:34 PM, Dan Kulinski <span dir="ltr"><<a href="mailto:daniel@kulinski.net">daniel@kulinski.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The symbolic link names are related to how and when a script is started or stopped. SNNname in rcY.d means that the script linked to should be started a priority NN in runlevel Y. In this fashion you can control the dependencies of the particular script by ensuring that other scripts have run before it. <br>
<br>The symbolic links with beginning with a K are executed when leaving that runlevel. So for all run levels you have the "S" script linked you should have an opposing "K" script. <br><br>Finally you must have both the start case and the stop case in the /etc/init.d/script.sh so the RedHat init manager can call those specific functions. Also, if available chkconfig can handle the management of the symbolic links in the /etc/rcN.d directories if the header of the script is well formed. <br>
<font color="#888888">
<br>Dan Kulinski<br>
</font></blockquote></div><br>