diff debian/postinst @ 459:fb5e1ef118eb noffle

[svn] simplified config file handling using ucf >= 0.17
author godisch
date Mon, 14 Jul 2003 07:56:43 +0100
parents 1420216cd450
children a5cb498bcbed
line wrap: on
line diff
--- a/debian/postinst	Wed Jul 09 18:52:33 2003 +0100
+++ b/debian/postinst	Mon Jul 14 07:56:43 2003 +0100
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: postinst 601 2003-06-29 07:22:59Z godisch $
+# $Id: postinst 604 2003-07-14 06:56:43Z godisch $
 
 set -e
 
@@ -41,22 +41,14 @@
 		sed "s/^default-expire[[:space:]].*/default-expire $defexpire/" \
 		> /etc/news/noffle.conf.new
 	chgrp news /etc/news/noffle.conf.new
-	if cmp -s /etc/news/noffle.conf /etc/news/noffle.conf.new; then
-		UCF_FORCE_CONFFNEW=YES ucf /etc/news/noffle.conf.new /etc/news/noffle.conf < /dev/tty
-	else
-		ucf /etc/news/noffle.conf.new /etc/news/noffle.conf < /dev/tty
-	fi
+	ucf /etc/news/noffle.conf.new /etc/news/noffle.conf < /dev/tty
 	rm -f /etc/news/noffle.conf.new
 
 	umask 022
 	cat /usr/share/noffle/conf.debian | \
 		sed "s/^NOFFLE_FETCHMODE=.*/NOFFLE_FETCHMODE=$fetchmode/" \
 		> /etc/default/noffle.new
-	if cmp -s /etc/default/noffle /etc/default/noffle.new; then
-		UCF_FORCE_CONFFNEW=YES ucf /etc/default/noffle.new /etc/default/noffle < /dev/tty
-	else
-		ucf /etc/default/noffle.new /etc/default/noffle < /dev/tty
-	fi
+	ucf /etc/default/noffle.new /etc/default/noffle < /dev/tty
 	rm -f /etc/default/noffle.new
 
 	db_get noffle/port
@@ -69,16 +61,8 @@
 
 	db_stop
 else
-	if cmp -s /etc/news/noffle.conf /usr/share/noffle/noffle.conf; then
-		UCF_FORCE_CONFFNEW=YES ucf /usr/share/noffle/noffle.conf /etc/news/noffle.conf < /dev/tty
-	else
-		ucf /usr/share/noffle/noffle.conf /etc/news/noffle.conf < /dev/tty
-	fi
-	if cmp -s /etc/default/noffle /usr/share/noffle/conf.debian; then
-		UCF_FORCE_CONFFNEW=YES ucf /usr/share/noffle/conf.debian /etc/default/noffle < /dev/tty
-	else
-		ucf /usr/share/noffle/conf.debian /etc/default/noffle < /dev/tty
-	fi
+	ucf /usr/share/noffle/noffle.conf /etc/news/noffle.conf < /dev/tty
+	ucf /usr/share/noffle/conf.debian /etc/default/noffle < /dev/tty
 	port="`grep "/usr/bin/noffle -r" /etc/inetd.conf 2> /dev/null | sed 's/[[:space:]].*$//'`" || true
 	if [ "$port" ]; then
 		update-inetd --enable "$port"