What is the naming convention for files in rcX.d?
Just wondering what the logic is behind the names of the files in the /etc/init.d/rcX.d directories (X=0..6).
From my research so far, I have gathered the following information. Can anyone confirm if my information is correct, and/or fill in the missing details?
* The filenames are of the form S<N><service> or K<N><service>, where N is some number (e.g. S72autofs or K50inetd).
* The files are (usually) symbolic links to scripts in /etc/init.d.
* The "S" scripts are run upon starting a run level. They are run in order of their number (hence S05foo is run before S06bar).
* The "K" scripts are run when changing run levels. So, if I am going from run level A to run level B, the "K" scripts in rcA.d will be run, in order of their numbers.
Is that more or less it? Is anything in the above wrong or not quite right?
What I still don't know though, is how one chooses the numbers.
For example (a real example -- this is why I am looking into this in the first place!) take autofs: Currently, autofs is not being loaded upon booting my SuSE 8.2 PC. So, every time I boot, I have to manually do a /etc/init.d/autofs start (as root) to get it going. I would like to have this done at boot instead.
I have determined that I'll need a line in /etc/init.d/rc5.d (and possibly rc3.d) for this, of the form S<N>autofs. But how do I know what value to choose for N? Can it be anything, or is autofs picky in terms of the order in which it is loaded? And then what about the corresponding K files?
Google searching has shown me that S72autofs and K08autofs are popular choices for Red Hat distros, but why? Can the same be used for SuSE 8.2?
Putting autofs aside for the moment, how would I name the S & K files for arbitrary services?
Thanks to all in advance!
In case it helps: I am running SuSE 8.2 Pro and use Enlightenment windows manager.