-   Linux - Hardware (
-   -   Shutdown with power button (

hriosm 06-03-2003 04:16 PM

Shutdown with power button

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.

Hector Rios

whansard 06-03-2003 04: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 06:20 PM

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 05: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 02: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.


All times are GMT -5. The time now is 08:42 PM.