battery low script

martinko gamato at users.sf.net
Tue Dec 19 14:05:36 PST 2006


m.ehinger at ltur.de wrote:
> Sorry my mistake, i forgot it completely, thanks
> 
> (See attached file: battery)
> 
> maik
> 
> 
> 
>                                                                                                                                     
>              Nate Lawson <nate at root.org>                                                                                            
>                                                                                                                                     
>              22.08.2005 18:51                                                                                                    An 
>                                                                m.ehinger at ltur.de                                                    
>                                                                                                                               Kopie 
>                                                                                                                                     
>                                                                                                                               Thema 
>                                                                Re: battery low script                                               
>                                                                                                                                     
>                                                                                                                                     
>                                                                                                                                     
>                                                                                                                                     
>                                                                                                                                     
>                                                                                                                                     
> 
> 
> 
> 
> m.ehinger at ltur.de wrote:
>> Hi,
>>
>> i use the attached script to shutdown my notebook on low battery automatically.
>>
>> I also added the following to /etc/devd.conf
>>
>> notify 10 {
>>       match "system"          "ACPI";
>>       match "subsystem" "CMBAT";
>>       action                  "/etc/battery $notify";
>> };
>>
>>
>> Please feel free to try without any guarantees.
>>
>> Comments are welcome.
>>
>> thanks
>>
>> Maik
> 
> the attachment was missing.  Try sending it inline, not as an attachment.
> 
> --
> Nate
> 


hello,

i wonder what is "sleep 1" within the script good for .. ??

also, i could imagine someone to run shutdown(8) manually with a grace
period eg 1h and later on (someone else?) plugging in the power cord
upon which the script would kill the (manual) shutdown process.  (i
guess it's very unlikely, though.)

anyway, thanks for the script!

regards,

martin



More information about the freebsd-acpi mailing list