summaryrefslogtreecommitdiffstats
path: root/mobile/acpi-support/acpi-support_0.103-5.diff
blob: 737e0213288b38b3faf4033dc05c566ae5c58096 (plain) (blame)
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
diff -Naur acpi-support-0.103.orig/debian/acpi-support.init acpi-support-0.103/debian/acpi-support.init
--- acpi-support-0.103.orig/debian/acpi-support.init	2007-11-15 04:51:03.000000000 -0600
+++ acpi-support-0.103/debian/acpi-support.init	2008-02-29 22:17:27.000000000 -0600
@@ -11,22 +11,25 @@
 # Short-Description: Start some power management scripts
 ### END INIT INFO
 
+# Adding smgl stuff..
+PROGRAM=/etc/acpi/power.sh
+RUNLEVEL=3
+. /etc/init.d/smgl_init
+
 test -f /usr/share/acpi-support/power-funcs || exit 0
 
 # 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
 
-case "$1" in
-  start)
-    log_begin_msg "Checking battery state..."
+# Changing to support SMGL init way to do things...
+
+function start() {
+    echo "Checking battery state..."
     if [ x"`echo /proc/acpi/ac_adapter/*`" != x"/proc/acpi/ac_adapter/*" ]; then 
-	/etc/acpi/power.sh
+	$PROGRAM
     fi
     # Source everything in /etc/acpi/start.d/
     for SCRIPT in /etc/acpi/start.d/*.sh; do
@@ -34,20 +37,21 @@
   	  . $SCRIPT
   	fi
     done
-    log_end_msg 0
-    ;;
-  stop)
-    log_begin_msg "Disabling power management..."
+    echo "Done..."
+}
+
+function stop() {
+    echo "Disabling power management..."
     if [ x"`echo /proc/acpi/ac_adapter/*`" != x"/proc/acpi/ac_adapter/*" ]; then
-	/etc/acpi/power.sh stop
+	$PROGRAM stop
     fi
-    log_end_msg 0
-    ;;
-  restart|force-reload)
-    # Doesn't make sense for that package
-    ;;
-  *)
-  ;;
-esac
-        
+    echo "Done..."
+}
 
+function restart() {
+    echo "Unsupported..."
+}
+
+function force-reload() {
+    echo "Unsupported..."
+}
diff -Naur acpi-support-0.103.orig/vbesave acpi-support-0.103/vbesave
--- acpi-support-0.103.orig/vbesave	2007-11-15 04:57:02.000000000 -0600
+++ acpi-support-0.103/vbesave	2008-02-29 22:05:02.000000000 -0600
@@ -11,19 +11,23 @@
 #                    restored later to a sane state for example after a suspend.
 ### END INIT INFO
 
+# Adding SMGL stuff
+PROGRAM=/usr/sbin/vbetool
+RUNLEVEL=3
+. /etc/init.d/smgl_init
+
 test -f /usr/share/acpi-support/power-funcs || exit 0
 
 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
 
-case "$1" in
- start)
+# Changing to support SMGL init way to do things...
+
+function start() {
 	if laptop-detect > /dev/null; then
 		LAPTOP=true;
 	fi
@@ -33,26 +37,28 @@
 	fi
 
         DeviceConfig
-	log_begin_msg "Saving VESA state..."
+	echo "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
+		if ! $PROGRAM vbestate save > $VBESTATE 2>/dev/null; then
+		    echo "$?"
 		fi
 	    else
-		if ! vbetool vbestate save > $VBESTATE ; then
-		    log_end_msg $?
-		    exit 1
+		if ! $PROGRAM vbestate save > $VBESTATE ; then
+		    echo "$?"
 		fi
 	    fi
-	    log_end_msg 0
+	    echo "VESA state saved..."
         fi
-        ;;
- stop|restart|force-reload)
-	# Doesn't make sense (and shut up lintian)
-	;;
- *)
-        exit 0
-        ;;
-esac
+	echo "Done..."
+}
+
+function stop()
+{
+	echo "Unsupported..."
+}
+
+function restart()
+{
+	echo "Unsupported..."
+}