Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (2) </ [1] 2 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Shutdown on press of the power button.., ..is there an easy way to realise this?< Next Oldest | Next Newest >
eeffoC Offline





Group: Members
Posts: 29
Joined: Jan. 2007
Posted: Jan. 13 2007,20:18 QUOTE

Hi!

I am wondering if there is an easy way to make my DSL system react on my power button.
I would like to perform a system shutdown if the button is pressed shortly.

Any ideas how to solve this?

Thanks in advance!
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Jan. 13 2007,22:13 QUOTE

/etc/inittab , acpi , apm keywords might help you out...
Back to top
Profile PM 
Juanito Offline





Group: Members
Posts: 1601
Joined: Sep. 2005
Posted: Jan. 15 2007,03:13 QUOTE

If your system is acpi compliant, you can "apt-get install acpid".

The acpid daemon will detect "power button events" and run a script of your making. If you put the following in the script, you should get a shutdown when you press the button briefly:

exitcheck.sh shutdown (or reboot)
Back to top
Profile PM 
eeffoC Offline





Group: Members
Posts: 29
Joined: Jan. 2007
Posted: Jan. 16 2007,17:35 QUOTE

Hi Juanito,

that sounds like a clean and straight way for me, thanks a lot for your advice!

Today I finally found some time to try it.. here is what I have done (im working with a frugal system with cf card on a quite modern computer):

- changed the bootoption "noacpi" into "acpi=force"
- apt-get install acpi
- changed powerbtn.sh as required
- put powerbtn.sh and events/powerbtn in filetool.lst

I tested my powerbutton.sh script by executing it manually and it works fine. Also I can let the acpi commands show me the temperature of my system - but still it doesnt react on my powerbutton.
Also I cant find a logfile on (/ramdisk)/var/logs/

Any further ideas on this problem? Maybe I forgot something?

Thanks a lot in advance,

Jan
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: Jan. 16 2007,17:45 QUOTE

I don't start syslogd by default on live CD or frugal type installations.
But for debuging it is nice to start and then check /var/log/messages.

sudo syslogd

It there!
Back to top
Profile PM WEB 
9 replies since Jan. 13 2007,20:18 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (2) </ [1] 2 >/
reply to topic new topic new poll
Quick Reply: Shutdown on press of the power button..

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code