Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 66670
Collapse All | Expand All

(-)battery.sh (-14 lines)
Lines 11-30 Link Here
11
[ "${SPEEDFREQ_SPEED}" != "auto" ] && exit 0
11
[ "${SPEEDFREQ_SPEED}" != "auto" ] && exit 0
12
12
13
case "$2" in
13
case "$2" in
14
		BAT0)
15
		if [ $4 -eq 00000001 ] && [ -f /proc/acpi/battery/BAT0/state ] ; then
16
			action="`cat /proc/acpi/battery/BAT0/state | grep charging | cut -c 26-`"
17
			case $action in
18
				charging)	/usr/bin/speedfreq -p performance
19
						logger "A/C adapter plugged in"
20
						;;
21
				discharging)	/usr/bin/speedfreq -p powersave
22
						logger "A/C adapter plugged out"
23
						;;
24
			esac
25
		fi
26
		;;
27
28
		BAT1)
14
		BAT1)
29
		if [ $4 -eq 00000001 ] && [ -f /proc/acpi/battery/BAT1/state ] ; then
15
		if [ $4 -eq 00000001 ] && [ -f /proc/acpi/battery/BAT1/state ] ; then
30
			action="`cat /proc/acpi/battery/BAT1/state | grep charging | cut -c 26-`"
16
			action="`cat /proc/acpi/battery/BAT1/state | grep charging | cut -c 26-`"

Return to bug 66670