hughsient at gmail.com
Wed Oct 26 09:55:45 PDT 2005
On Wed, 2005-10-26 at 12:36 -0400, David Zeuthen wrote:
> [davidz at daxter ~]$ hal-find-by-capability --capability
So we could add something like this:
acad=`hal-find-by-capability --capability ac_adapter`
if [ $acad ] ; then
onac=`hal-get-property --udi=$acad --key=ac_adapter.present`
if [ "x$onac" == "xfalse" ] ; then
echo "On battery power, aborting"
at the top of a typical cron script, say for instance:
So these don't get invoked when on battery.
What do you think?
More information about the hal