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..." +}