Date: Thu, 6 Jul 2000 10:58:43 -0400 From: jsegovia@cnc.una.py To: j mckitrick <jcm@freebsd-uk.eu.org> Cc: mobile@freebsd.org, jsegovia@cnc.una.py Subject: Re: apm on toshiba 4010cdt Message-ID: <39646663.28541.D142D6@localhost> In-Reply-To: <20000706154311.A9703@dogma.freebsd-uk.eu.org> References: <20000706230923G.iwasaki@jp.FreeBSD.org>; from iwasaki@jp.freebsd.org on Thu, Jul 06, 2000 at 11:09:23PM %2B0900
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Jonathon,
I think you should grab the output of apm: retval=$(apm -l).
Juan
> On Thu, Jul 06, 2000 at 11:09:23PM +0900, Mitsuru IWASAKI wrote:
> > you could do like this;
> > /etc/apmd.conf:
> > apm_event POWERSTATECHANGE, CAPABILITIESCHANGE {
> > exec "YOUR_SCRIPT_HERE";
> > }
>
> ok, here's my script so far:
>
> #!/bin/sh
> /usr/sbin/apm -l
> retval=$?
> if [ $retval -eq 10 ]; then
> /usr/local/bin/beep
> /usr/local/bin/beep
> /usr/local/bin/beep
> fi
>
> and all it does is show the battery level. i adjusted the '-eq 10' to '-eq
> 255' just to test it, since i am using AC power now. but it still does the
> same thing, and does not beep.
>
--
Centro Nacional de Computacion
Universidad Nacional de Asuncion
Tel. +595 (21) 585 550
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39646663.28541.D142D6>
