summaryrefslogtreecommitdiff
path: root/recipes/acpid
diff options
context:
space:
mode:
authorRoman I Khimov <khimov@altell.ru>2010-03-22 15:03:00 +0300
committerRoman I Khimov <khimov@altell.ru>2010-03-23 10:26:25 +0300
commit1a482af394a8ddfbe1d576d4d2b73510b8fdfdee (patch)
tree8e728996f67a6b0eaa23704dfe32bcad6f61392d /recipes/acpid
parent72beffecc9acb05e8426c3ba7f41693074fd473a (diff)
acpid: add script to halt on power button press
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes/acpid')
-rw-r--r--recipes/acpid/acpid.inc7
-rw-r--r--recipes/acpid/files/powerbtn-acpi-support2
2 files changed, 7 insertions, 2 deletions
diff --git a/recipes/acpid/acpid.inc b/recipes/acpid/acpid.inc
index bb976c95f7..af696f1617 100644
--- a/recipes/acpid/acpid.inc
+++ b/recipes/acpid/acpid.inc
@@ -2,10 +2,11 @@ SECTION = "base"
DESCRIPTION = "A daemon for delivering ACPI events."
LICENSE="GPL"
-INC_PR = "r4"
+INC_PR = "r5"
SRC_URI = "${SOURCEFORGE_MIRROR}/acpid/acpid-${PV}.tar.gz \
- file://init"
+ file://init \
+ file://powerbtn-acpi-support"
inherit update-rc.d
@@ -23,4 +24,6 @@ do_install () {
install -d ${D}${sysconfdir}/init.d
cat ${WORKDIR}/init | sed -e's,/usr/sbin,${sbindir},g' > ${D}${sysconfdir}/init.d/acpid
chmod 755 ${D}${sysconfdir}/init.d/acpid
+ install -d ${D}${sysconfdir}/acpi/events
+ install -m 0644 ${WORKDIR}/powerbtn-acpi-support ${D}${sysconfdir}/acpi/events/
}
diff --git a/recipes/acpid/files/powerbtn-acpi-support b/recipes/acpid/files/powerbtn-acpi-support
new file mode 100644
index 0000000000..b2e80f925a
--- /dev/null
+++ b/recipes/acpid/files/powerbtn-acpi-support
@@ -0,0 +1,2 @@
+event=button[ /]power
+action=halt