[ltp] UPS signals for shutdown

Helmut Hullen linux-thinkpad@linux-thinkpad.org
16 Mar 2008 17:32:00 +0100


Hallo, Henrique,

Du meintest am 16.03.08 zum Thema Re: [ltp] UPS signals for shutdown:

>> In my very special case pure shutdown would be enough. But first (as
>> you had mentioned) I should know which signal I have to watch.

> Maybe you will need to enable some kernel ACPI debugging stuff to
> make triple sure there is not a notification that is being delivered,
> but nothing in the kernel is listening.

A cronjob which watches

        /proc/acpi/ac_adapter/AC/state
        /proc/acpi/battery/BAT0/state
        /proc/acpi/battery/BAT0/info

may do the job. Looking every 3 minutes may be fast enough, even with my  
nearly rotten batteries.

Viele Gruesse!
Helmut