From 1a482af394a8ddfbe1d576d4d2b73510b8fdfdee Mon Sep 17 00:00:00 2001 From: Roman I Khimov Date: Mon, 22 Mar 2010 15:03:00 +0300 Subject: acpid: add script to halt on power button press Signed-off-by: Roman I Khimov --- recipes/acpid/acpid.inc | 7 +++++-- recipes/acpid/files/powerbtn-acpi-support | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 recipes/acpid/files/powerbtn-acpi-support (limited to 'recipes/acpid') 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 -- cgit v1.2.3