On 07/12/2011 06:19 AM, Theodore You wrote:
> On Tue, Jul 12, 2011 at 9:47 AM, Bruce Dubbs<[email protected]>  wrote:
>>
>> Theodore You wrote:
>>> The book says in chapter 7.3:
>>>      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
>>>      parameter stop to stop something.
>>>
>>> If so, why are there still scripts starting with an S in these two
>>> directories?
>>> Why not change all S to K?
>>
>> When changing to any run level, the rc script is run.  It goes through
>> the K entries with a stop.  For runlevels 0 and 6, all the S entries are
>> also run, in order, with a stop.  For runlevels 1-5, The S entries are
>> run with a start.
> According to the rc script, if an S entry was started in previous
> runlevel, and not stopped in current runlevel, it will be skipped, but
> if we are switching to runlevel 0 or 6, this script won't be stopped.
> Is this intended or I'm wrong?

Actually, this check needs to be removed. It causes issues for the alsa 
script and also setclock (if used to set hwclock when network goes down 
in RL2).

>>
>> For runlevels 0 and 6, this lets us shut down in the order started (K
>> entries) and then run the S entries, in order, to actually halt or
>> restart the system.
> If we want to change the order of these scripts, we can simply change
> the number of the script, I still think there's no need for the S.

There is no real _need_ for S links in 0 and 6. What it provides is a 
failsafe of sorts. Nothing outside of system software should ever put a 
start link in 0 and 6 ensuring that the last few scripts are run last 
(sendsignals, mountfs, and reboot/halt IIRC).

-- DJ Lucas

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to