lkml.org 
[lkml]   [2001]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Let init know user wants to shutdown
On Fri, 13 Apr 2001, Pavel Machek wrote:

> > Then a more general user space tool could be used that would do policy
> > appropriate stuff, ending with init 0.

> init _is_ the tool which is right for defining policy on such issues.

> Take a look how UPS managment is handled.

A power failure is a different thing from a power button press. There are
users (me for example) who want to have something different then "init 0"
mapped to the power button, for example a sleep state (since my box
doesn't have a dedicated sleep button). I doubt there are many people who
want something else than a shutdown if the power is out (although I think
there will be with suspend-to-disk working, so we might have to change UPS
handling here).

My plan for power management was to have a special daemon that would
decide what to do based on system state (battery status, local time, ...)
and events (power/sleep button, last user logged out, ...) [I know that
from a programmer's POV, both are events]. This daemon could, for example,
make sure that no services are affected, for example by priming WOL and
entering a not-so-deep sleep state instead of doing a suspend-to-disk if
someone is still listening on a port after the "shutdown unimportant
services" scripts have been run.

Simon

--
GPG public key available from http://phobos.fs.tum.de/pgp/Simon.Richter.asc
Fingerprint: DC26 EB8D 1F35 4F44 2934 7583 DBB6 F98D 9198 3292
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:25    [W:0.353 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site