Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-power/acpid/files: acpid-2.0.4-default.sh
Date: Mon, 26 Apr 2010 12:55:45
Message-Id: 20100426125543.0902E2C043@corvid.gentoo.org
1 ssuominen 10/04/26 12:55:42
2
3 Added: acpid-2.0.4-default.sh
4 Log:
5 Version bump wrt #317273 by Tim Harder. Install new powerbtn.sh wrt #253764 by Pacho Ramos.
6 (Portage version: 2.2_rc67/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 sys-power/acpid/files/acpid-2.0.4-default.sh
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/acpid/files/acpid-2.0.4-default.sh?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/acpid/files/acpid-2.0.4-default.sh?rev=1.1&content-type=text/plain
13
14 Index: acpid-2.0.4-default.sh
15 ===================================================================
16 #!/bin/sh
17 # /etc/acpi/default.sh
18 # Default acpi script that takes an entry for all actions
19
20 set $*
21
22 group=${1%%/*}
23 action=${1#*/}
24 device=$2
25 id=$3
26 value=$4
27
28 log_unhandled() {
29 logger "ACPI event unhandled: $*"
30 }
31
32 case "$group" in
33 button)
34 case "$action" in
35 power)
36 /etc/acpi/powerbtn.sh
37 ;;
38
39 # if your laptop doesnt turn on/off the display via hardware
40 # switch and instead just generates an acpi event, you can force
41 # X to turn off the display via dpms. note you will have to run
42 # 'xhost +local:0' so root can access the X DISPLAY.
43 #lid)
44 # xset dpms force off
45 # ;;
46
47 *) log_unhandled $* ;;
48 esac
49 ;;
50
51 ac_adapter)
52 case "$value" in
53 # Add code here to handle when the system is unplugged
54 # (maybe change cpu scaling to powersave mode). For
55 # multicore systems, make sure you set powersave mode
56 # for each core!
57 #*0)
58 # cpufreq-set -g powersave
59 # ;;
60
61 # Add code here to handle when the system is plugged in
62 # (maybe change cpu scaling to performance mode). For
63 # multicore systems, make sure you set performance mode
64 # for each core!
65 #*1)
66 # cpufreq-set -g performance
67 # ;;
68
69 *) log_unhandled $* ;;
70 esac
71 ;;
72
73 *) log_unhandled $* ;;
74 esac