One year ago i had the same problem and found a program named powerswitch from Joris van Rantwijk. The only thing you need is setting the power button from on/off to suspend in your bios. You can get it here: http://deadlock.et.tudelft.nl/~joris/powerswitch/
Hope this helps you. Stefan Drees > -----Ursprüngliche Nachricht----- > Von: Randy Orrison [mailto:[EMAIL PROTECTED]] > Gesendet: Freitag, 20. Dezember 2002 15:10 > An: debian-user > Betreff: Shutdown via power button > > > I've set up a debian linux server which the user wants to be able to > shut down every day. It's set up without a keyboard or monitor, any > administration is done by telnet. I'd like them to be able to shut it > down cleanly by hitting the power button. The attached > message I found > in the archive explains how to do it, and works fine, with the caveat > mentioned in the message. The system will sometimes suspend before > shutting down, and the user has to push the power button again to wake > it up so it can shut down (if you follow). Does anyone have > a solution > to this? Either a way to delay or cancel the suspend, or > significantly > speed up the shutdown. Thanks! > > | From: "Martin Bialasinski" <[EMAIL PROTECTED]> > | Date: 18 Jun 1999 23:53:26 +0200 > | > | >> "AM" == Alisdair McDiarmid <[EMAIL PROTECTED]> writes: > | > | AM> I've got an ATX system with APM enabled and working > fine. I'd like > | AM> to disable the power button in software so that the machine > | AM> effectively cannot be switched off without root access > - `shutdown > | AM> -h now' would still halt and power-down. > | > | I do something similar. Instead of disabling the button > (don't know if > | this is possible), I set it in the BIOS to make the computer go to > | power-safe mode (suspend). (holding it pressed down will still turn > | the computer off). > | > | Then I installed apmd and make a script /etc/apm/suspend.d/shutdown > | #!/bin/sh > | > | shutdown -h now > | > | Now when I press the button, the box will do a clean > | shutdown. SOmetimes the suspend mode is initialized before > linux could > > | kill everything, then i press the button again, suspend mode will be > | deactivated, and the suspeded shutdown command will finish its job. > | > | Kind of handy, if your keyboard and mouse is stuck (do to a bug in X > | or 3Dfx or such). > > -- > Randy Orrison > Keswick Computer Services > > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact > [EMAIL PROTECTED] > -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]