Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: nano on June 04, 2014, 11:29:31 AM

Title: (solved) How to configure acpid for power button
Post by: nano on June 04, 2014, 11:29:31 AM
Hi
I used this way for shuting down system when power key is pressed,
Code: [Select]
cat /usr/local/etc/acpi/events/power
event=button[ /]power
actions=/usr/local/etc/acpi/actions/power.sh "%e"

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

Code: [Select]
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.
Title: Re: How to configure acpid for power button
Post by: gerald_clark on June 04, 2014, 11:38:20 AM
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
Title: Re: How to configure acpid for power button
Post by: Misalf on June 04, 2014, 12:26:26 PM
Code: [Select]
actions=
Code: [Select]
action=
Title: (solved) Re: How to configure acpid for power button
Post by: nano on June 04, 2014, 03:07:54 PM
Thanks, I do this
cat /usr/local/etc/acpi/events/power
event=button[ /]power
action=exitcheck.sh

That works correctly