Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
09-01-2003, 11:49 AM
|
#1
|
LQ Newbie
Registered: Aug 2003
Location: London, UK
Distribution: SuSE 8.2 Pro
Posts: 5
Rep:
|
What is the naming convention for files in rcX.d?
Hi all,
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.
Cheers,
Michael
|
|
|
09-01-2003, 01:14 PM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Its also Distro specific on how they want to name the rc.X scripts. Some are more complicated than others.
Like Slackware you'll have your runlevel scripts that call upon the other scripts:
rc.S
rc.M
rc.K
rc.4
rc.6
rc.0
And then you'll have the other scripts that are named by the type of service its starting or stopping.
rc.modules
rc.samba
rc.httpd
rc.nfsd
rc.inet1
rc.inet2
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.
|
|
|
09-01-2003, 04:41 PM
|
#3
|
Member
Registered: May 2003
Location: India
Distribution: Knoppix, RedHat
Posts: 246
Rep:
|
hi
you dont need to add or removing scripts by messing up with the directory. dont worry abt k n or whatever. just use a front end
redhat has these two stuff
ntsysv
chkconfig
i am not sure what suse does. check their extensive docs.
|
|
|
All times are GMT -5. The time now is 05:48 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|