[oe-commits] Roman I Khimov : acpid: add script to halt on power button press

git version control git at git.openembedded.org
Tue Mar 23 07:29:36 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 1a482af394a8ddfbe1d576d4d2b73510b8fdfdee
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=1a482af394a8ddfbe1d576d4d2b73510b8fdfdee

Author: Roman I Khimov <khimov at altell.ru>
Date:   Mon Mar 22 15:03:00 2010 +0300

acpid: add script to halt on power button press

Signed-off-by: Roman I Khimov <khimov at altell.ru>

---

 recipes/acpid/acpid.inc                   |    7 +++++--
 recipes/acpid/files/powerbtn-acpi-support |    2 ++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/recipes/acpid/acpid.inc b/recipes/acpid/acpid.inc
index bb976c9..af696f1 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 0000000..b2e80f9
--- /dev/null
+++ b/recipes/acpid/files/powerbtn-acpi-support
@@ -0,0 +1,2 @@
+event=button[ /]power
+action=halt





More information about the Openembedded-commits mailing list