[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: acpi battery event

Alessandro Speranza wrote:
Hi Folks.
I just wrote a small script that helps managing automatically acpi battery events. Basically, what this script does, is to analyse the particular event by checking out /proc/acpi/battery/BAT0/state and info and decides what needs to be done. So, if the battery is low and off-line, it sleeps for 60 secs. and then goes to suspend (swsusp2). On the other hand, if the battery is on AC power, it just sends a message. Also, if on AC power, and the hibernation process has started already, it kills it.
I'm sure it's not the most elegant way for doing this, but
it seems to be working on my Compaq Presario 700. Have a look at it, if you find it useful, and let me know if it works.

IMPORTANT: The two scripts are designed to sit in /usr/local/sbin, so change that to suit your taste.

Take care

 You forgot to put a licence at the begining... Preferably GNU GPL.
As far as US laws (i am not there) no modification is allowed to your script as it is now.



Reply to: