On 2006-06-08, Erik de Castro Lopo <[EMAIL PROTECTED]> wrote:
> Jeff Waugh wrote:
>
>> What happens when you do the above, when you're on battery?
>
> Not good:
>
> [EMAIL PROTECTED] > on_ac_power
> [EMAIL PROTECTED] > echo $?
> 1
If you were on battery running the above, that should be correct. "man
on_ac_power" says:
EXIT STATUS
0 (true) System is on mains power
1 (false) System is not on mains power
255 (false) Power status could not be determined
(I found this out after seeing that I was 0 on mains power and 1 on
battery -- "why is it the wrong way around???")
-Mary
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html