diff debian/postrm @ 324:5ec39beae9c5 noffle

[svn] cleanup
author godisch
date Sat, 22 Feb 2003 21:54:34 +0000
parents eef64bccd0e2
children c36eb2596531
line wrap: on
line diff
--- a/debian/postrm	Sat Feb 22 21:09:23 2003 +0000
+++ b/debian/postrm	Sat Feb 22 21:54:34 2003 +0000
@@ -1,34 +1,28 @@
 #!/bin/sh
-# $Id: postrm 451 2003-02-20 10:57:54Z godisch $
+# $Id: postrm 459 2003-02-22 21:54:34Z godisch $
 
 set -e
-. /usr/share/debconf/confmodule
-db_version 2.0
 
 server_config=/etc/news/noffle.conf
 debian_config=/etc/default/noffle
 
-case "$1" in
-remove)
+if [ "$1" = remove -o "$1" = purge ]; then
 	rm -f /usr/share/emacs/site-lisp/gnus/noffle.elc
 	rm -rf /var/lock/noffle
-	;;
-purge)
+fi
+
+if [ "$1" = purge ]; then
 	update-inetd --remove "/usr/bin/noffle -r"
 	update-rc.d noffle remove > /dev/null
-	rm -f /usr/share/emacs/site-lisp/gnus/noffle.elc \
+	rm -f /etc/noffle.conf /etc/noffle.conf.old \
 		$server_config $server_config.old \
-		$debian_config $debian_config.old \
-		/etc/noffle.conf /etc/noffle.conf.old
-	rm -rf /etc/noffle /var/spool/noffle /var/lock/noffle
-	db_purge
-	;;
-upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
-	;;
-*)
-	echo "postrm called with unknown argument '$1'" >&2
-	exit 1
-	;;
-esac
+		$debian_config $debian_config.old
+	rm -rf /etc/noffle /var/spool/noffle
+	if [ -e /usr/share/debconf/confmodule ]; then
+		. /usr/share/debconf/confmodule
+		db_purge
+		db_stop
+	fi
+fi
 
 exit 0