Date: Mon, 6 Jul 2009 21:37:51 +1000 From: "Daniel O'Connor" <doconnor@gsoft.com.au> To: freebsd-current@freebsd.org Cc: Rene Schickbauer <cavac@magicbooks.org> Subject: Re: RFC: powerd Patch & proposed future changes Message-ID: <200907062137.52621.doconnor@gsoft.com.au> In-Reply-To: <18510.213.150.228.38.1246864978.squirrel@mail.magicbooks.org> References: <18510.213.150.228.38.1246864978.squirrel@mail.magicbooks.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart9377106.N4SKKcU5Jh
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
On Mon, 6 Jul 2009, Rene Schickbauer wrote:
> Would it also make sense to have powerd run an (optional) user
> configureable script on ac state change? I'm thinking about things
> like dimming TFT backlight, on EEE PC turning of the webcam and so
> on.
devd can already do this..
Create a file for /usr/local/etc/devd (doesn't matter what it's called)
with this in it..
notify 10 {
match "system" "ACPI";
action "/usr/local/bin/acpi-ev $system $subsystem $type $notify";
};
The script will be called with "ACPI ACAD _SB_.AC__ 0x00" on power failure=
=20
and "ACPI ACAD _SB_.AC__ 0x01" when connected.
(It is easy to call logger $0 $* in your script to check various events out=
=2E.
=2D-=20
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
--nextPart9377106.N4SKKcU5Jh
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)
iD8DBQBKUeIQ5ZPcIHs/zowRAt5PAJ4zX3xRuL2m8t0ceXz4xg1LL0ZjxgCfYB0A
Qc+ZS3Xzkx4xEkhOCb7I48E=
=5B/p
-----END PGP SIGNATURE-----
--nextPart9377106.N4SKKcU5Jh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907062137.52621.doconnor>
