#!/bin/bash

case "$1" in
        configure)
                invoke-rc.d acpid restart>/dev/null
                ;;
        *)
                ;;
esac

#fix up old packages.
if [ -L /etc/rc2.d/S20acpi-support ]; then
# we're probably using defaults, so let's blow us away.
        update-rc.d -f acpi-support remove
fi

if [ ! -L /etc/rc1.d/K20acpi-support -a -L /etc/rc2.d/S99acpi-support ]; then
        update-rc.d -f acpi-support remove
fi

if dpkg --compare-versions "$2" lt 0.14; then
        if [ -L /etc/rcS.d/S52vbesave ];then
                update-rc.d -f vbesave remove >/dev/null
        fi
fi

if [ -x "/etc/init.d/vbesave" ]; then
        update-rc.d vbesave start 05 2 3 4 5 . >/dev/null
fi

#DEBHELPER#
