On Dec 21, 2006, at 7:18 AM, Adam McDougall wrote: > On Wed, Dec 20, 2006 at 11:01:58PM +0300, Andrew Pantyukhin wrote: > > put into /etc/devd.conf and reload devd: > > notify 10 { > match "system" "ACPI"; > match "subsystem" "Lid"; > action "/etc/rc.lid $notify"; > }; > > Then in /etc/rc.lid: > > #!/bin/sh > STAT=$1 > > if [ $STAT = 0x00 ]; then > logger -t Lid $STAT Close at `date +'%Y%m%d %H:%M:%S'` > # do something for lid close event here > else > logger -t Lid $STAT Open at `date +'%Y%m%d %H:%M:%S'` > # do something for lid open event here > fi Would it be possible to see such a script added to /usr/share/ examples/etc? Cheers, /* Andre Guibert de Bruet * 6f43 6564 7020 656f 2e74 4220 7469 6a20 */ /* Code poet / Sysadmin * 636f 656b 2e79 5320 7379 6461 696d 2e6e */ /* GSM: +1 734 846 8758 * 5520 494e 2058 6c73 7565 6874 002e 0000 */ /* WWW: siliconlandmark.com * C/C++, Java, Perl, PHP, SQL, XHTML, XML */Received on Fri Dec 22 2006 - 10:58:18 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:04 UTC