Other Help Topics :: Shutdown on press of the power button..
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!
/etc/inittab , acpi , apm keywords might help you out...
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)
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
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!
Next Page...
original here.