mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@suse.cz>
To: Sergei Haller <Sergei.Haller@math.uni-giessen.de>,
	linux-kernel@vger.kernel.org,
	ACPI mailing list <acpi@phobos.fachschaften.tu-muenchen.de>
Subject: Re: shutdown on pressing the ATX power button
Date: Thu, 9 Aug 2001 19:56:05 +0200	[thread overview]
Message-ID: <20010809195605.B25162@bug.ucw.cz> (raw)
In-Reply-To: <865464921.20010309170338@turbolinux.com.cn> <Pine.LNX.4.33.0108081344340.753-100000@fb07-calculator.math.uni-giessen.de>
In-Reply-To: <Pine.LNX.4.33.0108081344340.753-100000@fb07-calculator.math.uni-giessen.de>; from Sergei Haller on Wed, Aug 08, 2001 at 01:52:52PM +0200

Hi!

> is there any way to let the system execute something by pressing the ATX
> power button (preferrable executing 'shutdown -h now', but would be nice
> if it was configurable)
> 
> I looked into the (very large) list archive but didnt find any answer.
> if it is a kind of FAQ or off topic, please point me to the place I could
> find an answer.

Try this, and put this: into inittab

# Action on special keypress (ALT-UpArrow)
kb::kbrequest:/etc/rc/rc.reboot 2 0

--- clean/drivers/acpi/events/evevent.c	Sun Jul  8 23:26:27 2001
+++ linux/drivers/acpi/events/evevent.c	Sun Jul  8 23:25:01 2001
@@ -193,6 +168,8 @@
 
 	if ((status_register & ACPI_STATUS_POWER_BUTTON) &&
 		(enable_register & ACPI_ENABLE_POWER_BUTTON)) {
+                printk ("acpi: Power button pressed!\n");
+                kill_proc (1, SIGWINCH, 1);
 		int_status |= acpi_ev_fixed_event_dispatch (ACPI_EVENT_POWER_BUTTON);
 	}
 

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org

  reply	other threads:[~2001-08-09 19:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-09  9:03 about PENTIUM4 cache line michaelc
2001-08-08 11:52 ` shutdown on pressing the ATX power button Sergei Haller
2001-08-09 17:56   ` Pavel Machek [this message]
2003-08-17 20:25 ` about PENTIUM4 cache line Jamie Lokier
2003-08-17 20:36   ` David B. Stevens
2003-08-17 20:45     ` Dave Jones
2003-08-17 20:58       ` David B. Stevens
2003-08-17 20:42   ` Dave Jones
2003-08-17 22:52   ` Philippe Elie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010809195605.B25162@bug.ucw.cz \
    --to=pavel@suse.cz \
    --cc=Sergei.Haller@math.uni-giessen.de \
    --cc=acpi@phobos.fachschaften.tu-muenchen.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome