Basics in init scripts:
init.d = Directory where the base files are used for startup and shutdown.
rcN.d = Directory that has copies of or links back to the base files in init.d specific to the run level represented by "N". These directories will have files in them in the form of S###script and K###script where S = Start, K = Kill (Stop), ### = the order in which to start or stop and script is the name of the script in init.d.
The reason you're not just seeing two directories though is due to the fact that different people have different ideas about the most appropriate place for the above. Therefore some people just make symbolic links so you can find them wherever you look.
If you look at your /etc/init.d and your /etc/rc.d/init.d you'll likely see one of them is a symbolic link to the other.
Similarly if you look at /etc/rcN.d and /etc/rc.d/rcN.d you'll see one of them is a symbolic link to the other.
This was part of the AT&T UNIX System V Release 4 (SVR4) way of doing things. HP-UX for example actually has init.d under /sbin instead of the directories you mention.
Last edited by MensaWater; 04-20-2010 at 12:44 PM.
|