sysvinit: rc vs. r2d2 bahavior
I had a deep look into the rc scripts from sysvinit and file-rc as
well as the r2d2 script by Winfried Trümper.
This is what rc (sysvinit) does and file-rc should do (I think, that
there is some bug):
1. Run all K??-scripts in the new runlevel with the parameter "stop"
except when starting up (prevlevel==N).
2. Run all S??-scripts in the new runlevel which are not in
prevlevel as S??-scripts or which are also K??-scripts in the new
runlevel. When going to runlevel 0 or 6, use parameter "stop"
For all this use the ascending order of the number of the scripts.
This seems to be historical normal behavior of rc, but it's not too
Instead of this here's what r2d2 does:
1. Run all K??-scripts in new runlevel, which are not K??-scripts in
the prevlevel. Do this in _descending_ order of the scripts
(stop first, what is started last). Use "stop" as parameter.
2. Run all S??-scripts in new runlevel, which are not S??-scripts in
the prevlevel. Do this in _ascending_ order of the scripts. Use
"start" as parameter.
So my question is the following: Why do we keep this non intuitive
behavior of sysvinit and file-rc instead of intuitive behavior of
* firstname.lastname@example.org * http://www.rhein.de/~roland/ *
PGP: 1024/DD08DD6D 2D E7 CC DE D5 8D 78 BE 3C A0 A4 F1 4B 09 CE AF