#! /bin/sh

pkg=acpid

if [ ! -d /proc/acpid ] ; then
	echo <<EOF

Your current kernel does not have ACPI support enabled. In order
to be able to use the Advanced Configuration and Power Interface
support you need to recompile your kernel with ACPI support enabled.

EOF
fi

case "$1" in
	configure)

		if [ -d /usr/doc -a ! -e /usr/doc/$pkg -a -d /usr/share/doc/$pkg ] ; then
		    ln -s ../share/doc/$pkg /usr/doc/$pkg
		fi

		update-rc.d acpid defaults > /dev/null
		/etc/init.d/acpid start
		;;
	abort-upgrade|abort-remove|abort-deconfigure)
		exit 0
		;;
	*)
		echo "postinst called with unknown argument"
		exit 1
		;;
esac


