LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-03-2003, 04:16 PM   #1
hriosm
LQ Newbie
 
Registered: Jun 2003
Posts: 3

Rep: Reputation: 0
Shutdown with power button


Hi,

Does anybody know how to shutdown the linux redhat 7 or 8 when one presses the power button?
It would be useful to me because most of the time I don't have a monitor connected to my linux server.

Thanks,
Hector Rios

Last edited by hriosm; 06-03-2003 at 04:18 PM.
 
Old 06-03-2003, 04:18 PM   #2
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
i don't think you can do it, but you can setup
poweroff if you have the apm module loaded.
type poweroff, and the machine shuts down and off.
 
Old 06-04-2003, 06:20 PM   #3
hriosm
LQ Newbie
 
Registered: Jun 2003
Posts: 3

Original Poster
Rep: Reputation: 0
pOWEROFF

I know it can be done because I have a 3Com Internet server that works this way. It comes with no keyboard and video connector closed. You would do the setup thru the internet.
Unfortunately, 3Com didn't provide root's password and can't access to check how they did it.
 
Old 06-05-2003, 05:47 PM   #4
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Moved to the Hardware forum

Yep - you need to build ACPI into your kernel or as a module. Then you can load the ospm_button module and start acpid. You should have a script in your /etc/acpi that will be called when a button event occurs. Usually it's not much more than 'shutdown -h now'.

We use it a lot for clients who have their own server. There's always som twit in the office who thinks that it's a good idea the shutdown the server because his Excel crashed. Really. It happens.

Last edited by mcleodnine; 06-05-2003 at 05:49 PM.
 
Old 06-06-2003, 02:43 PM   #5
hriosm
LQ Newbie
 
Registered: Jun 2003
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks McLeod (?)
I'll try. It may take me a while because my knowledge is not that good in those areas but will get there. Thanks again.

Hector
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Power Button for Shutdown gokul Linux - Hardware 4 01-24-2004 12:40 PM
ACPI: shutdown computer by pushing power button... elluva Mandriva 10 12-15-2003 03:57 AM
RH 9 orderly shutdown by power button? geezjan Red Hat 1 09-19-2003 10:01 AM
Automatic shutdown when power button pressed.. mr_smidge Linux - General 9 09-08-2003 02:16 AM
Shutdown routine with power button bfought Linux - Newbie 2 09-09-2002 06:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration