RFC: powerd Patch & proposed future changes

Daniel O'Connor doconnor at gsoft.com.au
Mon Jul 6 11:36:32 UTC 2009


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 
and "ACPI ACAD _SB_.AC__ 0x01" when connected.

(It is easy to call logger $0 $* in your script to check various events out..

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20090706/1d416b93/attachment.pgp


More information about the freebsd-current mailing list