From owner-cvs-all Mon May 14 22:44:54 2001 Delivered-To: cvs-all@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id CA6F137B422; Mon, 14 May 2001 22:44:48 -0700 (PDT) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f4F5im807379; Mon, 14 May 2001 22:44:48 -0700 (PDT) Date: Mon, 14 May 2001 22:44:48 -0700 From: Alfred Perlstein To: Nick Sayer 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> References: <200105150513.f4F5Djr76928@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200105150513.f4F5Djr76928@freefall.freebsd.org>; from nsayer@FreeBSD.org on Mon, May 14, 2001 at 10:13:45PM -0700 X-all-your-base: are belong to us. Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Nick Sayer [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