summaryrefslogtreecommitdiff
blob: aba336085a3c5aed2ade72ec8e7710feebabd40a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
diff -ur orig/acpi-support-0.91/debian/init.d work/acpi-support-0.91/debian/init.d
--- orig/acpi-support-0.91/debian/init.d	2006-03-28 11:26:44.000000000 -0500
+++ work/acpi-support-0.91/debian/init.d	2007-02-28 09:14:59.000000000 -0500
@@ -1,39 +1,37 @@
-#!/bin/bash
+#!/sbin/runscript
 # INIT script to check whether we're on batteries, and so start with laptop 
 # mode etc enabled.
 
 # BUGS: unless we start *really* late, we have no way of throttling 
 # xscreensaver, since it won't be there to command.
-. /usr/share/acpi-support/power-funcs
-
-test -f /lib/lsb/init-functions || exit 1
-. /lib/lsb/init-functions
-
-test -d /var/lib/acpi-support || exit 0
-
-shopt -s nullglob
-
-case "$1" in
-  start)
-    log_begin_msg "Checking battery state..."
-    if [ `echo /proc/acpi/ac_adapter/*` ]; then 
-	/etc/acpi/power.sh
-    fi
-    # Source everything in /etc/acpi/start.d/
-    for SCRIPT in /etc/acpi/start.d/*.sh; do
-	. $SCRIPT
-    done
-    log_end_msg 0
-    ;;
-  stop)
-    log_begin_msg "Disabling power management..."
-    if [ `echo /proc/acpi/ac_adapter/*` ]; then
-	/etc/acpi/power.sh stop
-    fi
-    log_end_msg 0
-    ;;
-  *)
-  ;;
-esac
-        
 
+depend() {
+	need acpid
+}
+
+start() {
+	ebegin "Starting acpi-support"
+	. /usr/share/acpi-support/power-funcs
+
+	test -d /var/lib/acpi-support || eend 0
+
+	shopt -s nullglob
+
+	ebegin "Checking battery state..."
+	if [ `echo /proc/acpi/ac_adapter/*` ]; then
+		/etc/acpi/power.sh
+	fi
+	# Source everything in /etc/acpi/start.d/
+	for SCRIPT in /etc/acpi/start.d/*.sh; do
+		. $SCRIPT
+	done
+	eend 0
+}
+
+stop() {
+	ebegin "Disabling power management..."
+	if [ `echo /proc/acpi/ac_adapter/*` ]; then
+		/etc/acpi/power.sh stop
+	fi
+	eend 0
+}
Only in work/acpi-support-0.91/debian: init.d~
diff -ur orig/acpi-support-0.91/hibernatebtn.sh work/acpi-support-0.91/hibernatebtn.sh
--- orig/acpi-support-0.91/hibernatebtn.sh	2006-02-06 09:54:47.000000000 -0500
+++ work/acpi-support-0.91/hibernatebtn.sh	2007-02-28 09:43:52.000000000 -0500
@@ -1,3 +1,3 @@
 #!/bin/bash
-. /usr/share/acpi-support/key-constants
-acpi_fakekey $KEY_SUSPEND 
+
+. /etc/acpi/hibernate.sh
diff -ur orig/acpi-support-0.91/sleepbtn.sh work/acpi-support-0.91/sleepbtn.sh
--- orig/acpi-support-0.91/sleepbtn.sh	2006-02-06 09:55:00.000000000 -0500
+++ work/acpi-support-0.91/sleepbtn.sh	2007-02-28 09:41:59.000000000 -0500
@@ -1,3 +1,3 @@
 #!/bin/bash
-. /usr/share/acpi-support/key-constants
-acpi_fakekey $KEY_SLEEP 
+
+. /etc/acpi/sleep.sh
diff -ur orig/acpi-support-0.91/vbesave work/acpi-support-0.91/vbesave
--- orig/acpi-support-0.91/vbesave	2006-05-03 16:31:51.000000000 -0400
+++ work/acpi-support-0.91/vbesave	2007-02-28 09:17:44.000000000 -0500
@@ -3,8 +3,6 @@
 test -x /usr/sbin/vbetool || exit 0
 set -e
 
-. /lib/lsb/init-functions
-
 test -f /etc/default/rcS && . /etc/default/rcS
 test -f /etc/default/acpi-support && . /etc/default/acpi-support
 test -f /usr/share/acpi-support/device-funcs && . /usr/share/acpi-support/device-funcs
@@ -20,20 +18,16 @@
 	fi
 
         DeviceConfig
-	log_begin_msg "Saving VESA state..."
 	if [ "$SAVE_VBE_STATE" = "true" ]; then
 	    if [ "$VERBOSE" = no ]; then 
 		if ! vbetool vbestate save > $VBESTATE 2>/dev/null; then
-		    log_end_msg $?
 		    exit 1
 		fi
 	    else
 		if ! vbetool vbestate save > $VBESTATE ; then
-		    log_end_msg $?
 		    exit 1
 		fi
 	    fi
-	    log_end_msg 0
         fi
         ;;
  *)