2006-11-13 22:01:22 +02:00
|
|
|
#!/bin/sh
|
2021-02-04 23:50:45 +01:00
|
|
|
#@ Default acpi script that takes an entry for all actions
|
|
|
|
|
|
|
|
log() {
|
|
|
|
logger -t /etc/acpi/default.sh "$*"
|
|
|
|
}
|
2006-11-13 22:01:22 +02:00
|
|
|
|
|
|
|
set $*
|
|
|
|
|
2021-02-04 23:50:45 +01:00
|
|
|
# In order to not cumulate ACPI events actual actions should be detached
|
|
|
|
# from/to /dev/null and backgrounded via &
|
|
|
|
(
|
2006-11-13 22:01:22 +02:00
|
|
|
case "$1" in
|
2021-02-04 23:50:45 +01:00
|
|
|
button/power)
|
|
|
|
case "$2" in
|
|
|
|
PWRF) /sbin/init 0;;
|
|
|
|
*) log "button/power action $2 not handled ($*)";;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*) log "ACPI group $1 / action $2 is not defined ($*)";;
|
2006-11-13 22:01:22 +02:00
|
|
|
esac
|
2021-02-04 23:50:45 +01:00
|
|
|
) </dev/null >/dev/null 2>&1 &
|