[clue] [Tech] Red Hat init scripts

Bruce Ediger bediger at stratigery.com
Wed Mar 16 12:13:40 MDT 2011


Can anyone with lots of Red Hat specific knowledge help me understand
"run levels" and init scripts on Red Hat 4.0?  I run Slackware and Arch
at home, and they both use BSD-style init scripts.

I've got an init script that at boot, checks to see if a lockfile
exists, and if it does, refuses to start a server process.

If the lockfile does not exist, the script starts the server process,
then creates a lockfile.

At system shutdown, the script supposedly stops the server process in
an orderly and hygenic fashion, then deletes the lockfile.

This is on Red Hat ESL 4.0, yes a bit out of date, but it's what I've
got to work with.  The box got rebooted, the lockfile stayed in place,
and my server process did not get started.  I'm trying to figure out
what went awry.

The script resides in /etc/rc.d/init.d: /etc/rc.d/init.d/script.sh

The script has symbolic links in:

/etc/rc.d/rc2.d/S97script.sh
/etc/rc.d/rc3.d/S97script.sh
/etc/rc.d/rc4.d/S97script.sh
/etc/rc.d/rc5.d/S97script.sh

I didn't install it this way, I believe that it should have 2 symbolic
links:

/etc/rc.d/rc3.d/S97script.sh
/etc/rc.d/rc0.d/K97script.sh

Does anyone have any idea why you might have symbolic links like this,
and does the lack of a "K"-prefix link keep init from doing a graceful
shutdown on it at boot time?


More information about the clue mailing list