|
@@ -35,25 +35,30 @@ before any runlevel is executed and runs the scripts listed in
|
|
/etc/rcS.d</para>
|
|
/etc/rcS.d</para>
|
|
|
|
|
|
<para>There are a number of directories under /etc that look like like rc?.d
|
|
<para>There are a number of directories under /etc that look like like rc?.d
|
|
-where ? is the number of the runlevel and rcS.d. A user might take a look
|
|
|
|
-at one of
|
|
|
|
-them (after this chapter is finished, right now there's nothing
|
|
|
|
-there yet). There are a number of symbolic links. Some begin with an K,
|
|
|
|
-the others begin with an S, and all of them have three numbers following
|
|
|
|
-the initial letter. The K means to stop (kill) a service, and the S means
|
|
|
|
-to start a service. The numbers determine the order in which the scripts
|
|
|
|
-are run, from 000 to 999; the lower the number the sooner it gets
|
|
|
|
-executed. When init switches to another runlevel, the appropriate
|
|
|
|
-services get killed and others get started.</para>
|
|
|
|
|
|
+where ? is the number of the runlevel and rcS.d which contain a number of s
|
|
|
|
+ymbolic links. Some begin with an K, the others begin with an S, and all
|
|
|
|
+of them have three numbers following the initial letter. The K means to
|
|
|
|
+stop (kill) a service, and the S means to start a service. The numbers
|
|
|
|
+determine the order in which the scripts are run, from 000 to 999; the
|
|
|
|
+lower the number the sooner it gets executed. When init switches to
|
|
|
|
+another runlevel, the appropriate services get killed and others get
|
|
|
|
+started.</para>
|
|
|
|
|
|
<para>The real scripts are in /etc/init.d. They do all the work, and the
|
|
<para>The real scripts are in /etc/init.d. They do all the work, and the
|
|
-symlinks all point to them. Killing links and starting
|
|
|
|
-links point to the same script in /etc/init.d. That's because the scripts
|
|
|
|
-can be called with different parameters like start, stop, restart, reload,
|
|
|
|
|
|
+symlinks all point to them. Killing links and starting links point to
|
|
|
|
+the same script in /etc/init.d. That's because the scripts can be
|
|
|
|
+called with different parameters like start, stop, restart, reload,
|
|
status. When a K link is encountered, the appropriate script is run with
|
|
status. When a K link is encountered, the appropriate script is run with
|
|
the stop argument. When a S link is encountered, the appropriate script
|
|
the stop argument. When a S link is encountered, the appropriate script
|
|
is run with the start argument.</para>
|
|
is run with the start argument.</para>
|
|
|
|
|
|
|
|
+<para>There is one exception. Links that start with an S in the
|
|
|
|
+rc0.d and rc6.d directories will not cause anything to be started. They
|
|
|
|
+will be called with the paramater <emphasis>stop</emphasis> to stop
|
|
|
|
+something. The logic behind it is that when you are going to reboot or
|
|
|
|
+halt the system, you don't want to start anything, only stop the
|
|
|
|
+system.</para>
|
|
|
|
+
|
|
<para>These are descriptions of what the arguments make the
|
|
<para>These are descriptions of what the arguments make the
|
|
scripts do:</para>
|
|
scripts do:</para>
|
|
|
|
|