Starting programs at boot (RedHat specific?)
Can anyone give me some advice on starting programs at boot (RedHat 7.2)?
I've worked out the following...
- At boot /etc/inittab is exec'd
- /etc/inittab calls /etc/rc with the runlevel as its argument
- /etc/rc executes all the files in /etc/rc.d/rc<runlevel>.d
- The files in /etc/rc.d/rc<runlevel>.d are all symlinks to the startup scripts for the various services with filenames in the format K|S<number><scriptname>
- If the symlink begins with a 'K' then the script is run with the argument 'stop', if the symlink begins with an 'S', the script is run with the argument 'start'.
- The scripts are run in numerical order of the number component of their symlink name
OK, now the question...
How do you decide what number to give a new symlink when adding a program to the startup sequence? The number for the existing 'stop' links don't relate to those for 'start' links (e.g K10xfs and S90xfs)
Previously I've done this sort of thing with linuxconf, but I thought I ought to be able to do it for myself...
|