Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
And so on....
This is one of the reasons I love Slackware, it has the most simplistic startup scripts, that are easy to understand and edit accordingly.
But I think from reading your post that you got it down, how it works, etc. I get confused though sometimes as I'm use to Slackware and then looking at the Redhat or Mandrake startup scripts, I get confused in finding what I need to edit, etc.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.