Hi!
> > This can also handle the user-dictated policy, which I haven't seen
> > discussed yet. For instance, when you close the lid or press the power
> > button, the system can enter suspend or it can power off. If the kernel
> > simply exported the event, the userspace daemon could simply check its
> > config file for the proper thing to do and initiate the transition.
>
> Exactly what I was suggesting. In this case, you'd get the event
>
> SLEEP ACPI Laptop case closed
>
> and your perl script could do something vaguely like
>
> /ACPI Laptop case closed$/ && system "shutdown -p now";
>
> to turn the machine off instead of sleeping.
Lid is polled device, at least in ACPI case. Take a look at current
/proc/power/ -- it contains file "ac" saying "on-line" or
"off-line". I believe we should add another device file "lid"
containing either "open" or "closed"
Pavel
-- I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care." Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org - 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/
This archive was generated by hypermail 2b29 : Mon Apr 23 2001 - 21:00:37 EST