On Mon, Nov 05, 2001 at 01:26:26PM -0800, Linux Gazette wrote:
> +-+--------------------------------------------------------------------+-+
> You've asked a question of The Answer Gang, so you've been sent the reply
> directly as a courtesy.  The TAG list has also been copied.  Please send all
> replies to <[EMAIL PROTECTED]> so that we can help our other
> readers by publishing the exchange in our monthly web magazine Linux Gazette,
> http://www.LinuxGazette.com.
> +-+--------------------------------------------------------------------+-+
> 
> On Mon, Nov 05, 2001 at 08:03:07PM +0000, Richard Adams wrote:
> > On Monday 05 November 2001 17:08, Joseph Jackson wrote:
> > 
> > > What I think he is talking about is that with some computers (dell is
> > > the only one I know) that are running windowsNT if you hit the power
> > > button on the front of the pc they begin to do a software shutdown.
> > >  Thats what he is asking how can he set it up so when he hits the power
> > > button that the machine notices this and goes into a software shutdown..
> > 
> > Well look at it this way, by depressing the power button on the computer you 
> > start a shutdown, ok yes i now know what wa meant, what Linux has that no 
> > windows software has is "ctrl-alt-del" invokes the defined call in 
> > /etc/inittab by default its in short, "shutdown -r now" that one can change to
> > use 'poweroff' 'shutdown' or 'reboot'.
> > 
> > So instead of pressing the power button on the machine itself, hit 
> > ctrl-alt-delete, advantage of that is no need to streach to reach the machine 
> > as the keyboard is right in front of you.
> > 
> > -- 
> > Regards Richard
> > [EMAIL PROTECTED]
> > http://people.zeelandnet.nl/pa3gcu/
> 
> +-+--------------------------------------------------------------------+-+
> You've asked a question of The Answer Gang, so you've been sent the reply
> directly as a courtesy.  The TAG list has also been copied.  Please send all
> replies to <[EMAIL PROTECTED]> so that we can help our other
> readers by publishing the exchange in our monthly web magazine Linux Gazette,
> http://www.LinuxGazette.com.
> +-+--------------------------------------------------------------------+-+
> 
> ATX-style computers have a momentary on/off switch that can (somehow) be 
> made to trigger the "shutdown" command -- maybe.  I'm not sure how it's done.
> Look through "man inittab", "man init" and the kernel documentation, and 
> maybe you'll get an idea.
> 
> This won't work with older AT-stype cases and motherboards because they have
> a true 2-position switch.  When you turn the switch off, it cuts the power
> mechanically, and Linux doesn't know about it.  Even if Linux did know about it,
> there's not enough processor cycles left for Linux to do a clean shutdown
> before it dies.
> 
> [Everybody, please include the original querent pclouds <pclouds at yahoo.com> and
> The Linux Gazette Answer Gang <linux-questions-only at ssc.com> on all follow-ups.]

There is also a POWERFAIL signal Linux uses to signal the detection of an 
imminent power failure.  It's meant for emergencies, but maybe you can somehow
latch onto that infrastructure.  But an option like 'ctrlaltdel' in '/etc/inittab' 
would
be more ideal.

-- 
Mike Orr, Editor, Linux Gazette    SSC: publishers of Linux Journal
[EMAIL PROTECTED]                     http://www.linuxjournal.com/
http://www.linuxgazette.com/
_______________________________________________
Linux-users mailing list
Archives, Digests, etc at http://linux.nf/mailman/listinfo/linux-users

Reply via email to