Run script on kernel hardware event?
I'm working on an ARM Chromebook with Debian (so no ACPI) and want to run a script when the lid closes. I can't find anything relevant in xinput, but evtest shows the close and open state change. The way I see it, I'd basically need to write a small daemon to listen for specific ioctl() calls (the event is an EV_SW event), and then run a script when it receives the call. How would I go about this? I'm proficient in bash/sed/awk, but don't know C (am willing to learn, however).
|