diff debian/prerm @ 324:5ec39beae9c5 noffle

[svn] cleanup
author godisch
date Sat, 22 Feb 2003 21:54:34 +0000
parents 85bf9f705e70
children c36eb2596531
line wrap: on
line diff
--- a/debian/prerm	Sat Feb 22 21:09:23 2003 +0000
+++ b/debian/prerm	Sat Feb 22 21:54:34 2003 +0000
@@ -1,25 +1,22 @@
 #!/bin/sh
-# $Id: prerm 446 2003-02-19 19:06:45Z godisch $
+# $Id: prerm 459 2003-02-22 21:54:34Z godisch $
 
 set -e
-. /usr/share/debconf/confmodule
-db_version 2.0
 
-db_get noffle/port || RET=''
-port="$RET"
-[ -z "$port" -o "$port" = 119 ] && port=nntp
+if [ -x /usr/sbin/invoke-rc.d ]; then
+	invoke-rc.d noffle stop
+elif [ -x /etc/init.d/noffle ]; then
+	/etc/init.d/noffle stop
+fi
 
-case "$1" in
-remove|upgrade|deconfigure)
-	echo "Disabling inet.d entry for noffle..."
+if [ -e /usr/share/debconf/confmodule ]; then
+	. /usr/share/debconf/confmodule
+	db_version 2.0
+	db_get noffle/port || RET=""
+	port="$RET"
+	[ -z "$port" -o "$port" = 119 ] && port=nntp
 	update-inetd --disable $port
-	;;
-failed-upgrade)
-	;;
-*)
-	echo "prerm called with unknown argument '$1'" >&2
-	exit 1
-	;;
-esac
+	db_stop
+fi
 
 exit 0