Tiny Core Base > TCB Q&A Forum

(solved) How to configure acpid for power button

(1/1)

nano:
Hi
I used this way for shuting down system when power key is pressed,

--- Code: ---cat /usr/local/etc/acpi/events/power
event=button[ /]power
actions=/usr/local/etc/acpi/actions/power.sh "%e"

--- End code ---


--- Code: ---cat /usr/local/etc/acpi/actions/power
#! /bin/sh
exitcheck.sh shutdown

--- End code ---


--- Code: ---cat ~/.X.d/init
sudo /usr/local/etc/init.d/acpid start

--- End code ---

based on this thread: http://forum.tinycorelinux.net/index.php/topic,2813.msg14943.html#msg14943

also I add execution permission to three above files.

But when I press power button nothing was happen.

gerald_clark:
You have an extra space in the event.


This is what I have.
cat /usr/local/etc/acpi/events/power
event=button[ /]power
action=exitcheck.sh

Misalf:

--- Code: ---actions=

--- End code ---

--- Code: ---action=

--- End code ---

nano:
Thanks, I do this

--- Quote from: gerald_clark on June 04, 2014, 08:38:20 AM ---cat /usr/local/etc/acpi/events/power
event=button[ /]power
action=exitcheck.sh

--- End quote ---

That works correctly

Navigation

[0] Message Index

Go to full version