Linked by David Adams on Sat 17th May 2008 03:39 UTC, submitted by IdaAshley
Thread beginning with comment 314754
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
News
Linked by Thom Holwerda on 05/18/13 7:37 UTC
Linked by fran on 05/18/13 1:38 UTC
Linked by Thom Holwerda on 05/17/13 23:35 UTC, submitted by kragil
Linked by MOS6510 on 05/17/13 22:22 UTC
Linked by Thom Holwerda on 05/17/13 22:15 UTC, submitted by Tom
Linked by Thom Holwerda on 05/16/13 21:41 UTC
Linked by Thom Holwerda on 05/16/13 17:04 UTC
Linked by Thom Holwerda on 05/16/13 13:17 UTC
Linked by Thom Holwerda on 05/16/13 12:06 UTC
Linked by Thom Holwerda on 05/15/13 23:03 UTC
More News »
Sponsored Links



Member since:
2007-05-20
In these rc0,1,2,3,4,5,6.d/ direcories are symlinks to scripts in /etc/init.d/, and it seems to me at least that this system uses both "rc.d/ entries" and runlevels, so I dont really get the destinction between rc-directories ans runlevels...
Care to explain?
Have a look at your /etc/inittab file. You will find a line that says something like:
id:2:initdefault:
This means that when you system, starts normally, it enters runlevel 2. Now move a few lines down, and you will see this:
l2:2:wait:/etc/init.d/rc 2
This basically means the rc script will execute the scripts in /etc/rc2.d
Now, have a look at the scripts in /etc/rc2.d:
An example:
S20ssh -> ../init.d/ssh
this starts the ssh server. Obviously it is just a link to a script in init.d, but the rc script reads this from /etc/rc2.d. The name and number are significant too. The 20 signifies the order of the script. For example this:
S19nis -> ../init.d/nis
executes before ssh. The "S" in the name means the rc script will call this script with a "start" argument. Essentially, S20ssh is like writing:
/etc/init.d/ssh start
If it had a "K" instead of an "S" it would be called with a "stop" argument.
Have a look at your /etc/rc1.d scripts. These are called when you switch to single user mode (runlevel 1). You will see that quite a few services are stopped (or "K"illed) when entering runlevel 1:
K80nfs-kernel-server -> ../init.d/nfs-kernel-server
this calls /etc/init.d/nfs-kernel-server stop, so NFS sharing is stopped when you enter single user mode.
There are also two "special" (or transient) runlevels, namely 0 (for shutdown) and 6 (for reboot). Have a look at the scripts there too.
After all, it is not a difficult system