#!/bin/sh -e
#
# post removal script for Dents
#
# Michel Onstein <michel@promera.nl>
#

case "$1" in
	remove)

		if grep 127.0.0.1 /etc/resolv.conf >/dev/null
		then
			echo
			echo "Localhost is still mentioned in /etc/resolv.conf, you might want to change that."
			echo
		fi
	;;

	upgrade)
	;;

	purge)
        	update-rc.d dents remove >/dev/null

		rm -f /var/dents/named.{boot,root}
		rm -f /var/dents/localhost.soa
		rm -f /var/dents/127.rev
		rm -f /var/dents/0.ip6.rev

		rmdir  /var/dents 2> /dev/null >&1 || true
	;;

	failed-upgrade|abort-install|abort-upgrade|disappear)
	;;
	
	*)
		echo "postrm called with unknown argument \`$1'" >&2
		exit 0
	;;
esac

exit 0
