LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Shutdown with power button (http://www.linuxquestions.org/questions/linux-hardware-18/shutdown-with-power-button-63483/)

hriosm 06-03-2003 05:16 PM

Shutdown with power button
 
Hi,

Does anybody know how to shutdown the linux redhat 7 or 8 when one presses the power button?
It would be useful to me because most of the time I don't have a monitor connected to my linux server.

Thanks,
Hector Rios

whansard 06-03-2003 05:18 PM

i don't think you can do it, but you can setup
poweroff if you have the apm module loaded.
type poweroff, and the machine shuts down and off.

hriosm 06-04-2003 07:20 PM

pOWEROFF
 
I know it can be done because I have a 3Com Internet server that works this way. It comes with no keyboard and video connector closed. You would do the setup thru the internet.
Unfortunately, 3Com didn't provide root's password and can't access to check how they did it.

mcleodnine 06-05-2003 06:47 PM

Moved to the Hardware forum

Yep - you need to build ACPI into your kernel or as a module. Then you can load the ospm_button module and start acpid. You should have a script in your /etc/acpi that will be called when a button event occurs. Usually it's not much more than 'shutdown -h now'.

We use it a lot for clients who have their own server. There's always som twit in the office who thinks that it's a good idea the shutdown the server because his Excel crashed. Really. It happens.

hriosm 06-06-2003 03:43 PM

Thanks McLeod (?)
I'll try. It may take me a while because my knowledge is not that good in those areas but will get there. Thanks again.

Hector


All times are GMT -5. The time now is 11:04 PM.