- 论坛徽章:
- 0
|
本人一台 Headless CentOS 5.3机器。 平时都是远程ssh去shutdown关机。
如果笔记本没开,想直接按电源键触发Linux关机指令 (和按住电源键5,6秒关电源不同)。我应该做些什么操作呢?
稍微查了些资料,和ACPI有关,看了比较早的帖子说要内核支持,还有开系统服务。 来龙去脉有点迷糊。
下面是看到的一文
for short, here is how i added shutting down via power button (on redhat 9):
1. compile the kernel with acpi support (be sure to include as built in
or module : ospm_busmgr, ospm_button,ospm_system)
2. either disable apm in kernel or add 'apm=off' to grub/lilo
3. get acpmd and install it (got rpms from sourceforge:
http://acpid.sourceforge.net/ )
4. if you have compiled the acpi modules as modules, be sure to insmod
them before /etc/inid.d/acpid runs
( what i did is add a 'modprobe' for them at the 'start()' in
/etc/init.d/acpid )
5.create a file : /etc/acpi/events/powerbtn with the following lines:
event=button[ /]power
action=/sbin/poweroff
6. reboot
硬件不太懂, 还没试验,有经验的人可否说下要注意的地方?谢先。 |
|