[clue] [Tech] Red Hat init scripts

Dan Kulinski daniel at kulinski.net
Wed Mar 16 13:41:21 MDT 2011


Out of curiosity, have you looked into using the RedHat function lib to
start and stop the service?  It has intelligence to check for the PID file
and a running PID so you don't run into these lock file issues.

Dan

On Wed, Mar 16, 2011 at 1:36 PM, Bruce Ediger <bediger at stratigery.com>wrote:

> On Wed, 16 Mar 2011, Dan Kulinski wrote:
>
> > 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).
>
> OK, that's what I thought from reading the /etc/rc.d/rc script, but
> there's so much gibberish about Red Hat init scripts out on the web that
> I felt like I had to double check somewhere reliable.
>
> I still can't tell why the script has 4 'S'-script links, and no
> 'K'-script link, but the lack of a 'K'-script explains why the lockfile
> existed through the shutdown and reboot.  /etc/rc.d/rc0.d/K97script.sh
> never got called, and that's the place where lockfile deletion happens.
> _______________________________________________
> clue mailing list
> clue at cluedenver.org
> http://cluedenver.org/mailman/listinfo/clue
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20110316/91187f63/attachment.html 


More information about the clue mailing list