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

(-)orig/acpi-support-0.91/debian/init.d (-33 / +31 lines)
Lines 1-39 Link Here
1
#!/bin/bash
1
#!/sbin/runscript
2
# INIT script to check whether we're on batteries, and so start with laptop 
2
# INIT script to check whether we're on batteries, and so start with laptop 
3
# mode etc enabled.
3
# mode etc enabled.
4
4
5
# BUGS: unless we start *really* late, we have no way of throttling 
5
# BUGS: unless we start *really* late, we have no way of throttling 
6
# xscreensaver, since it won't be there to command.
6
# xscreensaver, since it won't be there to command.
7
. /usr/share/acpi-support/power-funcs
8
9
test -f /lib/lsb/init-functions || exit 1
10
. /lib/lsb/init-functions
11
12
test -d /var/lib/acpi-support || exit 0
13
14
shopt -s nullglob
15
16
case "$1" in
17
  start)
18
    log_begin_msg "Checking battery state..."
19
    if [ `echo /proc/acpi/ac_adapter/*` ]; then 
20
	/etc/acpi/power.sh
21
    fi
22
    # Source everything in /etc/acpi/start.d/
23
    for SCRIPT in /etc/acpi/start.d/*.sh; do
24
	. $SCRIPT
25
    done
26
    log_end_msg 0
27
    ;;
28
  stop)
29
    log_begin_msg "Disabling power management..."
30
    if [ `echo /proc/acpi/ac_adapter/*` ]; then
31
	/etc/acpi/power.sh stop
32
    fi
33
    log_end_msg 0
34
    ;;
35
  *)
36
  ;;
37
esac
38
        
39
7
8
depend() {
9
	need acpid
10
}
11
12
start() {
13
	ebegin "Starting acpi-support"
14
	. /usr/share/acpi-support/power-funcs
15
16
	test -d /var/lib/acpi-support || eend 0
17
18
	shopt -s nullglob
19
20
	ebegin "Checking battery state..."
21
	if [ `echo /proc/acpi/ac_adapter/*` ]; then
22
		/etc/acpi/power.sh
23
	fi
24
	# Source everything in /etc/acpi/start.d/
25
	for SCRIPT in /etc/acpi/start.d/*.sh; do
26
		. $SCRIPT
27
	done
28
	eend 0
29
}
30
31
stop() {
32
	ebegin "Disabling power management..."
33
	if [ `echo /proc/acpi/ac_adapter/*` ]; then
34
		/etc/acpi/power.sh stop
35
	fi
36
	eend 0
37
}
(-)orig/acpi-support-0.91/hibernatebtn.sh (-2 / +2 lines)
Lines 1-3 Link Here
1
#!/bin/bash
1
#!/bin/bash
2
. /usr/share/acpi-support/key-constants
2
3
acpi_fakekey $KEY_SUSPEND 
3
. /etc/acpi/hibernate.sh
(-)orig/acpi-support-0.91/sleepbtn.sh (-2 / +2 lines)
Lines 1-3 Link Here
1
#!/bin/bash
1
#!/bin/bash
2
. /usr/share/acpi-support/key-constants
2
3
acpi_fakekey $KEY_SLEEP 
3
. /etc/acpi/sleep.sh
(-)orig/acpi-support-0.91/vbesave (-6 lines)
Lines 3-10 Link Here
3
test -x /usr/sbin/vbetool || exit 0
3
test -x /usr/sbin/vbetool || exit 0
4
set -e
4
set -e
5
5
6
. /lib/lsb/init-functions
7
8
test -f /etc/default/rcS && . /etc/default/rcS
6
test -f /etc/default/rcS && . /etc/default/rcS
9
test -f /etc/default/acpi-support && . /etc/default/acpi-support
7
test -f /etc/default/acpi-support && . /etc/default/acpi-support
10
test -f /usr/share/acpi-support/device-funcs && . /usr/share/acpi-support/device-funcs
8
test -f /usr/share/acpi-support/device-funcs && . /usr/share/acpi-support/device-funcs
Lines 20-39 Link Here
20
	fi
18
	fi
21
19
22
        DeviceConfig
20
        DeviceConfig
23
	log_begin_msg "Saving VESA state..."
24
	if [ "$SAVE_VBE_STATE" = "true" ]; then
21
	if [ "$SAVE_VBE_STATE" = "true" ]; then
25
	    if [ "$VERBOSE" = no ]; then 
22
	    if [ "$VERBOSE" = no ]; then 
26
		if ! vbetool vbestate save > $VBESTATE 2>/dev/null; then
23
		if ! vbetool vbestate save > $VBESTATE 2>/dev/null; then
27
		    log_end_msg $?
28
		    exit 1
24
		    exit 1
29
		fi
25
		fi
30
	    else
26
	    else
31
		if ! vbetool vbestate save > $VBESTATE ; then
27
		if ! vbetool vbestate save > $VBESTATE ; then
32
		    log_end_msg $?
33
		    exit 1
28
		    exit 1
34
		fi
29
		fi
35
	    fi
30
	    fi
36
	    log_end_msg 0
37
        fi
31
        fi
38
        ;;
32
        ;;
39
 *)
33
 *)

Return to bug 99446