[CentOS] How to get status of notebook lid?

Olaf Mueller

daily-planet at istari.de
Tue Apr 8 06:54:36 UTC 2008


Hello,

I am using CentOS 5.1 on a toshiba tecra 8000 notebook. That works
great so far. The only thing I could not realize is to shutdown the
notebook if closing the lid. Therefor I need the current status (open
or close) of the lid, but I don't know how.
Is there any way to get this status, maybe under /proc/ or by some
command?

[root at beutelsend ~]# uname -a
Linux beutelsend 2.6.18-53.1.14.el5 #1 SMP Wed Mar 5 11:36:49 EST 2008
i686 i686 i386 GNU/Linux
[root at beutelsend ~]# chkconfig --list apmd
apmd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root at beutelsend ~]# service apmd status
apmd (PID 1760) wird ausgeführt...


thank you very much
Olaf




More information about the CentOS mailing list