#!/bin/sh
# Default acpi script that takes an entry for all actions

set $*

group=${1/\/*/}
action=${1/*\//}
log=/var/log/acpid.log
pri=local0.notice
tag=ACPID

case "$group" in
    button)
        case "$action" in
            power) logger -p ${pri} -t ${tag} -f ${log} "ACPI power down"
                   /sbin/init 0
                ;;
            *)     logger -p ${pri} -t ${tag} -f ${log} "ACPI group $group / action $action is not defined"
                ;;
        esac
        ;;

    *)
        logger -p ${pri} -t ${tag} -f ${log} "ACPI group $group / action $action is not defined"
        ;;
esac
