WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: (solved) How to configure acpid for power button  (Read 3423 times)

Offline nano

  • Newbie
  • *
  • Posts: 28
(solved) How to configure acpid for power button
« 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

also I add execution permission to three above files.

But when I press power button nothing was happen.
« Last Edit: June 04, 2014, 03:16:59 PM by nano »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: How to configure acpid for power button
« Reply #1 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

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: How to configure acpid for power button
« Reply #2 on: June 04, 2014, 12:26:26 PM »
Code: [Select]
actions=
Code: [Select]
action=
Download a copy and keep it handy: Core book ;)

Offline nano

  • Newbie
  • *
  • Posts: 28
(solved) Re: How to configure acpid for power button
« Reply #3 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