#!/bin/sh
#
# This is the postinst script for the Debian GNU/Linux apmd package
#
# Written by Dirk Eddelbuettel <edd@debian.org>   

#DEBHELPER#

set -e 

if [ ! -e /proc/apm ]
then
    echo    ""
    echo -n "The apmd package requires kernel support which is missing "
    echo    "from the kernel"
    echo -n "that is currently running. You need to recompile your kernel "
    echo    "to use apmd."
    echo    ""
fi

case "$1" in
    configure)
	update-rc.d apmd defaults >/dev/null

	/etc/init.d/apmd start
	;;
    abort-upgrade|abort-remove|abort-deconfigure)
	exit 0
	;;
    *)
	echo "postinst called with unknown argument \`$1'" >&2
	exit 0
	;;
esac




