Date: Mon, 14 May 2001 22:44:48 -0700 From: Alfred Perlstein <bright@wintelcom.net> To: Nick Sayer <nsayer@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/apmd apmd.c apmd.h apmdlex.l apmdparse.y Message-ID: <20010514224448.K2009@fw.wintelcom.net> In-Reply-To: <200105150513.f4F5Djr76928@freefall.freebsd.org>; from nsayer@FreeBSD.org on Mon, May 14, 2001 at 10:13:45PM -0700 References: <200105150513.f4F5Djr76928@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Nick Sayer <nsayer@FreeBSD.org> [010514 22:13] wrote: > nsayer 2001/05/14 22:13:45 PDT > > Modified files: > usr.sbin/apmd apmd.c apmd.h apmdlex.l apmdparse.y > Log: > Add battery state monitoring to apmd. ... > > The code can be fooled. If you SIGHUP the daemon and the battery level > matches a rule it will be performed once per SIGHUP. If the battery > level matches a rule and you repeatedly apply and take away AC power, > the rule will be run once per occurance. This, however, is a feature. > :-) The code also only runs when select() times out, so getting APM > events more often than the timeout interval will result in the rules not > being run. These are things that remain to be overcome. I'm not sure of the structure of your rulesets, however if you implement a "last run" timestamp in them you can choose to ignore the events if they fall within N minutes/seconds of the last trigger. -- -Alfred Perlstein - [alfred@freebsd.org] http://www.egr.unlv.edu/~slumos/on-netbsd.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010514224448.K2009>