Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: nano on June 04, 2014, 11:29:31 AM
-
Hi
I used this way for shuting down system when power key is pressed,
cat /usr/local/etc/acpi/events/power
event=button[ /]power
actions=/usr/local/etc/acpi/actions/power.sh "%e"
cat /usr/local/etc/acpi/actions/power
#! /bin/sh
exitcheck.sh shutdown
cat ~/.X.d/init
sudo /usr/local/etc/init.d/acpid start
based on this thread: http://forum.tinycorelinux.net/index.php/topic,2813.msg14943.html#msg14943 (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.
-
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
-
actions=
action=
-
Thanks, I do this
cat /usr/local/etc/acpi/events/power
event=button[ /]power
action=exitcheck.sh
That works correctly