Runlevels and poweroff

Kevin Alm kevinalm at
Sat Sep 25 14:49:04 PDT 2004

----- Original Message -----
From: "Peter B. Steiger" <WYpbs_003 at>
To: <lfs-support at>
Sent: Saturday, September 25, 2004 12:31 PM
Subject: Runlevels and poweroff

> 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
> 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?
As meantioned in one of the other replies, apm tends to be a little buggy
with regards to power off on some mb's. One quick thing to try is to add
apm=power_off to the kernel appends. On many systems, this is all that is
needed to get it to work.


More information about the lfs-support mailing list