summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/acpid/acpi_handler.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core-testing/acpid/acpi_handler.sh')
-rwxr-xr-xabs/core-testing/acpid/acpi_handler.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/abs/core-testing/acpid/acpi_handler.sh b/abs/core-testing/acpid/acpi_handler.sh
new file mode 100755
index 0000000..65e4ee5
--- /dev/null
+++ b/abs/core-testing/acpid/acpi_handler.sh
@@ -0,0 +1,23 @@
+#!/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