what is the scripts in /etc/init.d for?
don't know what it's for.
|
These are all the startup scripts for the system. Depending on your distribution, there may be a softw link to various other directories to start and stop the functions. Redhat based distributions will place the links in /etc/rc.d/rcx.d The x will be replaced with the number 1 - 6, corresponding to a run level. If you boot to a graphical environment the default run level is 5. If you boot to a command prompt, the run level is probably 3; it is 2 in Debian based distributions.
|
"man init.d" will tell you.
Edit: sorry, "man init.d" is probably missing on your Linux distribution, I was wrongly thinking that was a Solaris related question. |
so basically every time you boot, first the rc.d directory is checked to see what to load, then the scripts in the /etc/init.d is to load the program?
|
You are close. If you take a look at my abbreviated answer, it alluded to run levels. You can find your default run level from the /etc/inittab file. It will list, among other things, the default run level. Let us assume you are running a Debian, or derivative distribution, and generally come up at the command line prompt. The default run level is 2. The scripts that would get run are located in /etc/rc.d/rc2.d. These 'scripts' are really links to similarly named scripts in the /etc/init.d directory. It is the mechanism that allows a subset of all scripts to be run at a specific run level. Slackware choses a bsd type of approach. The scripts to be run are stored in the /etc/rc.d directory.
|
more init.d questions
Hey,
I'm running a distro called Knoppmyth, and I'm studying the boot process. In my /etc/inittab script it reads: Quote:
However, there are /etc/rc0.d, /etc/rc1.d , (and so on) directories. These directories are filled with K** and S** links to various init.d/* files. (Example: S35networking -> ../init.d/networking) Long story short, because of inittab's references, I expected to find a whole bunch of S... and K... files in the /etc/init.d/rc # directories, not in the /etc/rc#.d directories. I don't understand why a file as rudimentry as inittab would reference several files that do not exist? And I don't understand how the machine knows to use the etc/rc#.d directories. (I might be incorrectly assuming that the /etc/rc#.d directories are reference at boot.) Is this typical, or is this a particular to Knoppmyth -- which is a specialized distro? |
Code:
/etc/init.d/rc 0 |
hmmm... that does make a difference. So /etc/init.d/rc 0 references (perhaps I could use the term "calls") /etc/rc0.d via the 0 argument. That makes sense. Ah! that feels better. Thanks
|
All times are GMT -5. The time now is 09:34 PM. |