Date: Thu, 1 Jul 2004 15:30:24 -0700 (PDT) From: Nate Lawson <nate@root.org> To: Drew Broadley <drew@corrupt.co.nz> Cc: mobile@freebsd.org Subject: Re: acpiexec - Run programs if on battery and/or ac power Message-ID: <20040701152848.G49159@root.org> In-Reply-To: <40E479CE.7060203@corrupt.co.nz> References: <40E479CE.7060203@corrupt.co.nz>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2 Jul 2004, Drew Broadley wrote: > I had a problem, whenever I was on battery I had cronjobs that were > running every 5 minutes for various things (my ifconfigd script, which > is like "whereami" for FreeBSD) and it sucked my battery down 3 times+ > faster. > > So here is the solution, I have made a Perl script ( and additional Perl > Module BSD::Sysctl for other uses including this script) where you exec > your current commands passed as an argument or option to acpiexec. By > default, acpiexec will run the command when on AC power but NOT on battery. Glad you're writing stuff but this sounds like it can be done fully in devd. Check out /etc/devd.conf and /etc/rc.d/power_profile and /etc/defaults/rc.conf to see how I use it to change Cx states on AC line transitions. We just enabled devd by default so hopefully more people will notice this capability. -Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040701152848.G49159>