[Gllug] Interrupt from power button?

Jan Kokoska kokoskaj at seznam.cz
Mon Sep 20 00:42:18 UTC 2004


Use ACPI in a recent (preferably latest) 2.6 kernel, then catch the
button event in acpid. Make sure you have the ACPI button either
compiled in or loaded as module. Place corresponding event and action
definitions in /etc/acpi/events and /etc/acpi/actions, respectively, see
man acpid.

Sample /etc/acpi/events/powerbutton:
event=button/power
action=/etc/acpi/actions/powerbutton.sh

Regards

Jan Kokoska

On Sun, 2004-09-19 at 08:59 +0100, John Winters wrote:
> One of the favourite ways to recover an XP workstation which has locked
> up is to hit the power button.  This seems to send some sort of signal
> to the OS causing it to shut down in an orderly fashion.
> 
> Is it possible to detect the same signal in Linux?  I'm thinking of
> setting up a small headless print server (using a spare Mini-ITX box)
> for very occasional use.  It would be nice if users could just hit the
> power button to turn it on and then press the same button to switch it
> off when they've finished.  Is there an entry I can make in /etc/inittab
> to have init detect this?
> 
> TIA,
> John
> 
-- 


-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list