Runlevels and poweroff

Jeremy Utley jeremy at jutley.org
Sat Sep 25 11:10:30 PDT 2004


Peter B. Steiger wrote:

>I'm having trouble getting the poweroff (or shutdown -h now) command to
>actually power off, so I'm tweaking the scripts in my rc0.d directory to
>make sure everything happens in the right order.
>
>Since my LFS installation is from February 2003, I figured it's time to
>see if improvements have been made in the bootscripts package, so I
>downloaded 2.2.3 to see what has changed.
>
>Among other differences, version 1.11 uses all K scripts in rc0.d and
>version 2.2.3 uses a couple of K scripts and the rest S scripts.  At the
>time I didn't know any better, so I just copied them as is into my
>/etc/rc.d directory.
>
>Maybe I'm misunderstanding how the shutdown process works, but it seems to
>me K scripts (e.g., K90localnet) would never occur.  Say I boot up in
>runlevel 3.  The way the rc.d/init.d/rc script works, it seems like the K
>scripts only run on $PREVLEVEL.  So if I'm shutting down from runlevel 3,
>I would enter runlevel 0, and rc would execute rc3.d/K* before executing
>rc0.d/S*, correct?  With that in mind, I don't see how K scripts would
>ever be run from rc0.d because at shutdown you would never have a
>PREVLEVEL of 0.
>
>If there's another step that takes place causing PREVLEVEL to also equal
>0, could someone give me a couple of whacks with the clue stick?
> 
>
>  
>
To enable the system to power off, there's a kernel setting in the APM 
section that allows this to work.  It's something to the effect of 
"Allow real mode BIOS calls to power off" or something to that effect.  
Make sure that's enabled.

-J-




More information about the lfs-support mailing list