[clue] [Tech] Red Hat init scripts

Dan Kulinski daniel at kulinski.net
Wed Mar 16 12:43:29 MDT 2011


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).

I always convince myself of the way it should work and then look at my
system to verify.  I need to reverse that order.

Dan

On Wed, Mar 16, 2011 at 12:34 PM, Dan Kulinski <daniel at kulinski.net> wrote:

> 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.
>
> 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.
>
> 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.
>
> Dan Kulinski
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20110316/be2e5754/attachment.html 


More information about the clue mailing list