Subject: Re: ENVSYS 2 and multiple batteries [fixed]
To: Juan RP <juan@xtrarom.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: current-users
Date: 09/02/2007 21:20:40
On Sun, 2 Sep 2007 21:55:28 +0200
Juan RP <juan@xtrarom.org> wrote:

> Hi,
> 
> I've committed some changes to HEAD minutes ago, that makes
> it easier to fix the problem with
> the /etc/powerd/scripts/sensor_battery script and multiple batteries
> (acpibat(4)), calling shutdown when a new critical event is received.
> 
> It's now fixed if you update your kernel and envstat(8) with the
> following revisions:
> 
> $NetBSD: sysmon_envsys.c,v 1.54 2007/09/02 19:36:59 xtraeme Exp $
> $NetBSD: acpi_bat.c,v 1.55 2007/09/02 19:38:32 xtraeme Exp $
> $NetBSD: envstat.c,v 1.44 2007/09/02 19:36:59 xtraeme Exp $
> 
> and the following patch:
> 
> http://www.netbsd.org/~xtraeme/sensor_battery.diff
> 
> The new sensor_battery script will _only_ shutdown if the AC adapter
> is OFF and _all_ batteries available in the system are in LOW or
> CRITICAL state.
> 
> Please test and let me know how it works...
> 
Excellent.  Do you know if your code is compatible with Jared's power
management branch?


		--Steve Bellovin, http://www.cs.columbia.edu/~smb