|
|
发表于 2004-10-23 01:03:12
|
显示全部楼层
FROM INTERNET:
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 folowing lines:
event=button[ /]power
action=/sbin/poweroff
你可以把action改了去,改成别的试试。 |
|