2 # /etc/acpid/actions/button.sh
4 # Detect buttons pressed and take appropriate actions.
13 logger "acpid: $1 action is not defined."
16 # put computer to sleep (not all machines have sleep button)
17 #echo mem > /sys/power/state
21 logger "acpid: $1 action is not defined"
22 # put computer to sleep
23 #echo mem > /sys/power/state
27 logger "acpid: $1 action is not defined"
28 # put computer to sleep
29 #echo mem > /sys/power/state
31 # if you want to specify separate commands for
32 # lid open/close uncomment this section:
34 #NUMBER=`printf "%d" "0x$4"`
35 #EVEN=`dc -e "1 k $NUMBER 2 / p" | grep "\.0"`
36 #if [ ! "$EVEN" ]; then
37 # logger "acpid: lid close action is not defined"
39 # logger "acpid: lid open action is not defined"
43 logger "acpid: $1 action is not defined"