On Fri, Apr 06, 2001 at 01:20:10PM -0400, D-Man wrote:
> On Fri, Apr 06, 2001 at 09:09:49AM -0700, Eric Richardson wrote:
> | 
> | I thought I understood runlevels but now I'm not so sure. Any help for
> | Debian runlevel explanation would be appreciated. In inittab I shows run
> | level two as default so does it go S,1,2 and why is S35networking in
> | rc0?
> 
> On a Linux system, it only runs the runlevel you specify.  That would
> be
> 
> S,2
> 
> for boot.  If you are already in a runlevel and you switch it runs the K* 
> stuff
> in the current level then the S* in the destination level.

<nitpick level=sorta>

in my potato /etc/init.d/rc script i've got

[snip]
  # Is there an rc directory for this new runlevel?
  if [ -d /etc/rc$runlevel.d ]
  then
        # First, run the KILL scripts.
        if [ $previous != N ]
        then
                for i in /etc/rc$runlevel.d/K[0-9][0-9]*
                do
                        # Check if the script is there.
                        [ ! -f $i ] && continue

                        # Stop the service.
                        startup $i stop
                done
        fi
        # Now run the START scripts for this runlevel.
        for i in /etc/rc$runlevel.d/S*
        do
                [ ! -f $i ] && continue
[snip]

indicating that when we ENTER a runlevel, first we run all its
KILL scripts, and then we run all its START scripts.

</nitpick>

the kill scripts are NOT run when exiting a runlevel, but rather
when entering. (that way you can make sure certain services are
DISABLED for runlevel N.)

-- 
does a brain cell think?

[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!

Reply via email to