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
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:51 UTC