wok-6.x diff acpid/stuff/acpi/acpi_handler.sh @ rev 18893
Update apache post_install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Feb 13 10:39:15 2016 +0100 (2016-02-13) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/acpid/stuff/acpi/acpi_handler.sh Sat Feb 13 10:39:15 2016 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +#!/bin/sh 1.5 +# A script for handling ACPI events. 1.6 +# See events/*.conf for a configuration file that can be used to 1.7 +# run this script. 1.8 + 1.9 +if [ $# != 1 ]; then 1.10 + exit 1 1.11 +fi 1.12 +set $* 1.13 + 1.14 +case "$1" in 1.15 + button/lid) 1.16 + [ -e /usr/sbin/pm-suspend ] && /usr/sbin/pm-suspend \ 1.17 + || logger "acpid: pm-suspend not found, skipping.." ;; 1.18 + ac_adapter) 1.19 + case "$2" in 1.20 + AC*|AD*) 1.21 + case "$4" in 1.22 + 00000000) # disconnected 1.23 + [ -e /usr/sbin/pm-powersave ] \ 1.24 + && /usr/sbin/pm-powersave battery \ 1.25 + || logger "acpid: pm-powersave not found, skipping.." ;; 1.26 + 00000001) # connected 1.27 + [ -e /usr/sbin/pm-powersave ] \ 1.28 + && /usr/sbin/pm-powersave ac \ 1.29 + || logger "acpid: pm-powersave not found, skipping.." ;; 1.30 + esac ;; 1.31 + esac ;; 1.32 + *) 1.33 + logger "acpid: action $1 $2 is not defined" ;; 1.34 +esac