TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:20740] Magic runlevels



Oh, my SuSE system looks the same, I just paraphrased the shell script.

Callum Lerwick <lerwick@tcfreenet.org> writes:

> Dave Sherohman wrote:
> > 
> > Jon Schewe said:
> > > Actually it is in rc0.d, look at the halt script.
> > 
> > *sigh*  There it is...  I just scanned the directory quickly and missed it.
> > (If I'd been thinking, I would've just looked at the last S entry - not much
> > point in trying to do anything else after shutting down, after all...)
> > 
> > > It calls halt -p -d -f, at
> > > least it does on my system, SuSE 6.4.
> > 
> > Basically the same here, except Debian adds a -i also.  ("Shut down all
> > network interfaces just  before  halt or reboot.")
> 
> And of course redhat makes things as complex as possible:
> 
> # See how we were called.
> case "$0" in
>   *halt)
>         message="The system is halted"
>         command="halt"
>         ;;
>   *reboot)
>         message="Please stand by while rebooting the system..."
>         command="reboot"
>         ;;
>   *)
>         echo "$0: call me as \"rc.halt\" or \"rc.reboot\" please!"
>         exit 1
>         ;;
> esac
> 
> (bunch of stuff for killing off processes, unmounting filesystems and
> misc other things cut out)
> 
> # Now halt or reboot.
> echo "$message"
> if [ -f /fastboot ]; then
>  echo "On the next boot fsck will be skipped."
> elif [ -f /forcefsck ]; then
>  echo "On the next boot fsck will be forced."
> fi
> 
> HALTARGS="-i -d"
> if [ -f /poweroff -o ! -f /halt ]; then
>  HALTARGS="$HALTARGS -p"
> fi
> 
> eval $command $HALTARGS
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tclug-list-unsubscribe@mn-linux.org
> For additional commands, e-mail: tclug-list-help@mn-linux.org

-- 
Jon Schewe | http://eggplant.mtu.net/~jpschewe
For I am convinced that neither death nor life, neither angels 
nor demons, neither the present nor the future, nor any 
powers, neither height nor depth, nor anything else in all 
creation, will be able to separate us from the love of God that 
is in Christ Jesus our Lord. - Romans 8:38-39