On Thursday 15 September 2005 14:18, Claudiu Cismaru wrote:
> De ce cele doua distributii mari au moduri diferite de a rula/oprii
> scripturile din /etc/rcX.d & friends?
>
> De exemplu, la Debian am observat ceva de genul
>
> for i in /etc/rc$oldrunlevel.d/K*; do
>   $i stop
> done
>
> APOI:
> for i in /etc/rc$newrunlevel.d/S*; do
>   $i start
> done
>
> adica K* executate INAINTE si din runlevelul PRECEDENT de start-ul din
> runlevelul in care s-a trecut.
>
> La RH/Fedora avem:
> for i in /etc/rc$newrunlevel.d/K*; do
>   $i stop
> done
>
> APOI:
> for i in /etc/rc$newrunlevel.d/S*; do
>   $i start
> done
>
> adica opresc ce nu am nevoie in ACEST (NOU) runlevel si pornesc ce nu e
> pornit.
>
> Care ar fi mai aproape de realitate, fata de SysV-ul original/standard?
>
> Nu de alta, dar Slackware foloseste Debian way si mie nu-mi place - nu
> ca nu as putea sa modific scriptul... dar... :(

Nu stiu de unde ai tras tu concluzia ca pe Debian se intampla ceea ce ai spus 
tu mai sus. Citat din /usr/share/doc/sysv-rc/README.runlevels.gz:

<--- quote --->
3. Switching runlevels.

   When one switches from (for example) runlevel 2 to runlevel 3,
   /etc/init.d/rc will first execute in alphabetical order all K
   scripts for runlevel 3 (/etc/rc3.d/KXXxxxx) with as first argument
   "stop" and then all S scripts for runlevel 3 (/etc/rc3.d/SXXxxxx)
   with as first argument "start".

   As an optimization, a check is made for each "service" to see if
   it was already running in the previous runlevel. If it was, and there
   is no K (stop) script present for it in the new runlevel, there is
   no need to start it a second time so that will not be done.

   On the other hand, if there was a K script present, it is assumed the
   service was stopped on purpose first and so needs to be restarted.

   We MIGHT make the same optimization for stop scripts as well-
   if no S script was present in the previous runlevel, we can assume
   that service was not running and we don't need to stop it either.
   In that case we can remove the "coming from level N" special case
   mentioned above in 2). But right now that has not been implemented.
</--- quote --->

... adica seamana cu ceea ce ai spus tu pentru RH/Fedora. Concluzia: nu exista 
diferentele de care pomenesti.


Mihai


-- 
This message was scanned for spam and viruses by BitDefender.
For more information please visit http://www.bitdefender.com/


_______________________________________________
RLUG mailing list
[email protected]
http://lists.lug.ro/mailman/listinfo/rlug

Raspunde prin e-mail lui