Re: [Acpi] Re: shutdown on pressing the ATX power button

Sergei Haller (Sergei.Haller@math.uni-giessen.de)
Fri, 10 Aug 2001 11:22:50 +0200 (CEST)


On Thu, 9 Aug 2001, Grover, Andrew wrote:

> Just use acpid - it should notice the power button press and do the right
> thing.

Thats exactly what I need. Thanks.

One problem I had, though. With ACPI on (and thus APM off) the system
wouldn't power off after halting. Here is the reason:

The shutdown script on my system (SuSE 7.2) looks for /proc/apm or
/proc/sys/acpi and calls 'halt -p' in both casese, else 'halt'.

Changing /proc/sys/acpi to /proc/acpi solved that last problem.
I suppose that other (older) kernel versions used /proc/sys/acpi instead
of /proc/acpi. The best solution is then to check for existence of one of
/proc/apm, /proc/sys/acpi and /proc/acpi.

Thanks again.

> -----Original Message-----
> From: Sergei Haller <Sergei.Haller@math.uni-giessen.de>
> To: linux-kernel@vger.kernel.org
>
> 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.

c ya
Sergei

--------------------------------------------------------------------
eMail: Sergei.Haller@math.uni-giessen.de
--------------------------------------------------------------------
Be careful of reading health books, you might die of a misprint.
-- Mark Twain

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/