Regards -- Andy
> From: Pavel Machek [mailto:pavel@suse.cz]
> > Just use acpid - it should notice the power button press
> and do the right
> > thing.
>
> This is not hardcoded, you can set it up in init just fine. (Well, I
> should not use SIGWINCH but some other signal). C-A-D is handled in
> very similar way, and I think it is the right way, and should be
> extended to halt, too.
>
> I just don't want to run acpid just because I want
> powerdown-on-powerbutton.
>
> Pavel
>
> > We do not want to hardcode what specific buttons do.
> >
> > Regards -- Andy
> >
> > > -----Original Message-----
> > > From: Pavel Machek [mailto:pavel@suse.cz]
> > > Sent: Thursday, August 09, 2001 10:56 AM
> > > To: Sergei Haller; linux-kernel@vger.kernel.org; ACPI mailing list
> > > Subject: [Acpi] Re: shutdown on pressing the ATX power button
> > >
> > >
> > > 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
> > >
> > >
> > > _______________________________________________
> > > acpi maillist - acpi@phobos.fs.tum.de
> > > http://phobos.fs.tum.de/mailman/listinfo/acpi
> > >
>
> --
> The best software in life is free (not shareware)! Pavel
> GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+
>
-
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/