[Gta04-owner] Linux 3.2-rc3 on GTA04

NeilBrown neilb at suse.de
Wed Nov 30 23:22:18 CET 2011


On Wed, 30 Nov 2011 12:11:17 +0100 Sander <openmoko at humilis.net> wrote:

> NeilBrown wrote (ao):
> > "shutdown -h now" is not suppose to power off.  The "correct" command is
> > "shutdown -h -P now"  so we should probably get use to that.
> 
> According to http://linux.die.net/man/8/shutdown
> "
> -h
>     Requests that the system be either halted or powered off after it has been brought down, with the choice as to which left up to the system. 
> -H
>     Requests that the system be halted after it has been brought down. 
> -P
>     Requests that the system be powered off after it has been brought down. 
> "
> 	Sander
> 

Yep .... time to learn something new ......


Ahhh.  So "shutdown" sends this request to init by passing an environment
variable to it, either
  INIT_HALT=HALT
or
  INIT_HALT=POWERDOWN

This in the interpreted by some /etc/init.d/ script,
typically /etc/init.d/halt.

So if you want

  shutdown -h now

to always request a power-down, just edit /etc/init.d/halt to always pass
"-p" to "/sbin/halt".

NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20111201/6535122e/attachment.bin>


More information about the Gta04-owner mailing list