Hello, Question: How do I check the state of the hinge (closed or open) without waiting for a /dev/input/eventX trigger?
Background: On my C1000 (angstrom x11, aug04/2007 image), the on/off switch is _very_ sensitive, and has a habit of turning the zaurus on when it is closed and suspended (in my pocket or back-pack). I usually don't notice, until I go to use it later and the battery is dead. I want to write a small script that would do the following: 1) On button is pressed 2) apm resume.d script checks hinge status 2) If hinge-closed, suspend (apm -s) I would put this script in the /etc/apm/scripts.d directory and link to the /etc/apm/resume.d directory. Another alternative I would consider would be to completely disable the on/off button and use something else actually under the screen (requiring opening the clamshell to turn the zaurus on). I searched the archives of the mailing list, but couldn't find anything that would answer my question. I also tried searching through the /sys and /proc filesystems... No luck so far -- seems that the hinge is event driven, and the state of the switch cannot be checked if not triggered. Can anybody offer a hint? Thank you, Michael Kers _______________________________________________ Angstrom-distro-users mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-users
