2010/9/5 dave jones <s.dave.jo...@gmail.com>: > Hello, > > I'm running FreeBSD 8 on my desktop. I want to write a file or do something > when I or someone presses power button. In devd.conf, I added the > following lines > for testing: > > notify 10 { > match "system" "ACPI"; > match "subsystem" "Button"; > matcho "notify" "0x00" > action "echo hello world"; > }; > > But it doesn't work. Would anyone tell me how to do? Thanks. > > Regards, > Dave. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" >
I think, you must first disable this setting because S5 is the default behavior when pressing the power button, it calls /etc/rc.shutdown. hw.acpi.power_button_state: S5 Disable it with sysctl hw.acpi.power_button_state=NONE and add this line to /etc/sysctl.conf. And then maybe the power button will be released for an other purpose? Kind regards. -- Demelier David _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"