changeset 411:b9018588cc52 noffle

[svn] fixed update-inetd
author godisch
date Thu, 19 Jun 2003 23:25:30 +0100
parents c9ff77f643a2
children 3698f482a940
files debian/postinst debian/prerm
diffstat 2 files changed, 13 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/debian/postinst	Thu Jun 19 23:17:21 2003 +0100
+++ b/debian/postinst	Thu Jun 19 23:25:30 2003 +0100
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: postinst 540 2003-06-03 21:17:53Z godisch $
+# $Id: postinst 554 2003-06-19 22:25:30Z godisch $
 
 set -e
 
@@ -32,6 +32,8 @@
 	mv -f /etc/noffle.conf.old $server_config.old 2> /dev/null || :
 fi
 
+# maybe disabled only, e.g. dpkg -r noffle
+update-inetd --remove "/usr/bin/noffle -r" || :
 if [ -e /usr/share/debconf/confmodule ]; then
 	. /usr/share/debconf/confmodule
 	db_version 2.0
@@ -42,8 +44,6 @@
 		if [ -z "$port" -o "$port" = 119 ]; then
 			port=nntp
 		fi
-		# maybe disabled only, e.g. dpkg -r noffle
-		update-inetd --remove "/usr/bin/noffle -r" || :
 		update-inetd --group MAIL --add "$port\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r"
 		db_get noffle/server
 		server="$RET"
@@ -103,6 +103,7 @@
 		cp -f /usr/share/noffle/conf.debian $debian_config.new
 		mv -fb $debian_config.new $debian_config
 	fi
+	update-inetd --group MAIL --add "nntp\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r"
 fi
 
 # sanity checks
--- a/debian/prerm	Thu Jun 19 23:17:21 2003 +0100
+++ b/debian/prerm	Thu Jun 19 23:25:30 2003 +0100
@@ -1,16 +1,19 @@
 #!/bin/sh
-# $Id: prerm 546 2003-06-05 17:27:28Z godisch $
+# $Id: prerm 554 2003-06-19 22:25:30Z godisch $
 
 set -e
 
 if [ -e /usr/share/debconf/confmodule ]; then
 	. /usr/share/debconf/confmodule
-	db_get noffle/port
-	port="$RET"
-	if [ -z "$port" -o "$port" = 119 ]; then
-		port=nntp
+	db_get noffle/debconf
+	if [ "$RET" = true ]; then
+		db_get noffle/port
+		port="$RET"
+		if [ -z "$port" -o "$port" = 119 ]; then
+			port=nntp
+		fi
+		update-inetd --disable "$port"
 	fi
-	update-inetd --disable $port
 	db_stop
 fi