From 31352df953653df1b5d6f193c3ed192536467b31 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Thu, 19 Feb 2009 10:04:26 -0600
Subject: Change handler.sh to call the runit-shutdown scripts directly.
 Previously it was failing because of a path issue.

---
 abs/core-testing/acpid/PKGBUILD        |  6 +-----
 abs/core-testing/acpid/__changelog     |  2 ++
 abs/core-testing/acpid/acpi_handler.sh | 23 -----------------------
 abs/core-testing/acpid/handler.sh      |  5 ++++-
 4 files changed, 7 insertions(+), 29 deletions(-)
 create mode 100644 abs/core-testing/acpid/__changelog
 delete mode 100755 abs/core-testing/acpid/acpi_handler.sh

diff --git a/abs/core-testing/acpid/PKGBUILD b/abs/core-testing/acpid/PKGBUILD
index 4fbbdf2..5b9d033 100644
--- a/abs/core-testing/acpid/PKGBUILD
+++ b/abs/core-testing/acpid/PKGBUILD
@@ -5,7 +5,7 @@
 
 pkgname=acpid
 pkgver=1.0.8
-pkgrel=1
+pkgrel=2
 pkgdesc="A daemon for delivering ACPI power management events"
 url="http://acpid.sourceforge.net"
 license=('GPL2')
@@ -16,10 +16,6 @@ source=(http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.t
     anything
     handler.sh)
 backup=('etc/acpi/handler.sh' 'etc/acpi/events/anything')
-md5sums=('1d9c52fe2c0b51f8463f357c2a3d3ddb'
-         '15903690f1bae4b3b0625b369de65521'
-         '2d37b98d6e74bab815604b8b48c6cfd4'
-         '0e8dd13793b1baa79a745f4034888367')
 
 build() {
     cd $srcdir/$pkgname-$pkgver
diff --git a/abs/core-testing/acpid/__changelog b/abs/core-testing/acpid/__changelog
new file mode 100644
index 0000000..1de4ec0
--- /dev/null
+++ b/abs/core-testing/acpid/__changelog
@@ -0,0 +1,2 @@
+Modify handler.sh to use runit-init. 
+
diff --git a/abs/core-testing/acpid/acpi_handler.sh b/abs/core-testing/acpid/acpi_handler.sh
deleted file mode 100755
index 65e4ee5..0000000
--- a/abs/core-testing/acpid/acpi_handler.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-# Default acpi script that takes an entry for all actions
-set $*
-EVENT=`echo $1 |cut -d/ -f1`
-ACTION=`echo $1|cut -d/ -f2`
-
-#echo $EVENT
-#echo $ACTION
-case "$EVENT" in
-  button)
-    case "$ACTION" in
-   power) 	
-	echo Please wait while the system powers off | /usr/local/bin/putfifo /tmp/onscreen &
-	xsay "Please wait while the system powers off" &
-	 /sbin/init 0
-        ;;
-       *)      logger "ACPI action $2 is not defined"
-        ;;
-    esac
-        ;;
-       *)      logger "ACPI group $1 / action $2 is not defined"
-        ;;
-esac
diff --git a/abs/core-testing/acpid/handler.sh b/abs/core-testing/acpid/handler.sh
index ad31d1a..f6b0f9b 100755
--- a/abs/core-testing/acpid/handler.sh
+++ b/abs/core-testing/acpid/handler.sh
@@ -14,7 +14,10 @@ case "$1" in
     button/power)
         #echo "PowerButton pressed!">/dev/tty5
         case "$2" in
-            PWRF)   logger "PowerButton pressed: $2" ;;
+            PWRF)   logger "PowerButton pressed: $2" 
+                    /sbin/runit-init 0
+                    /sbin/poweroff
+                    ;;
             *)      logger "ACPI action undefined: $2" ;;
         esac
         ;;
-- 
cgit v0.12

