]> git.pld-linux.org Git - packages/acpid.git/blob - acpid.button.sh
- updated to 2.0.34, include x32
[packages/acpid.git] / acpid.button.sh
1 #!/bin/sh
2 # /etc/acpid/actions/button.sh
3 # £ukasz Pawelczyk <havner@pld-linux.org>
4 #
5 # Detect buttons pressed and take appropriate actions.
6
7 if [ $# != 1 ]; then
8         exit 1
9 fi
10 set $*
11
12 case "$1" in
13   button/power)
14         logger "acpid: $1 action is not defined."
15         # halt computer
16         #halt
17         # put computer to sleep (not all machines have sleep button)
18         #echo mem > /sys/power/state
19         #hibernate
20         ;;
21   button/sleep)
22         logger "acpid: $1 action is not defined."
23         # put computer to sleep
24         #echo mem > /sys/power/state
25         #hibernate
26         ;;
27   button/lid)
28         logger "acpid: $1 action is not defined."
29         # put computer to sleep
30         #echo mem > /sys/power/state
31
32         # if you want to specify separate commands for
33         # lid open/close uncomment this section:
34
35         #ODD=`echo $4 | grep "[13579bdf]$"`
36         #if [ "$ODD" ]; then
37         #       logger "acpid: lid close action is not defined"
38         #else
39         #       logger "acpid: lid open action is not defined"
40         #fi
41         ;;
42   *)
43         logger "acpid: $1 action is not defined."
44         ;;
45 esac
This page took 0.078463 seconds and 3 git commands to generate.