Mercurial > noffle
diff debian/postinst @ 457:1420216cd450 noffle
[svn] improved ucf transition
author | godisch |
---|---|
date | Sun, 29 Jun 2003 08:22:59 +0100 |
parents | 57fc18375ad6 |
children | fb5e1ef118eb |
line wrap: on
line diff
--- a/debian/postinst Wed Jun 25 18:00:10 2003 +0100 +++ b/debian/postinst Sun Jun 29 08:22:59 2003 +0100 @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: postinst 598 2003-06-25 16:58:46Z godisch $ +# $Id: postinst 601 2003-06-29 07:22:59Z godisch $ set -e @@ -41,14 +41,22 @@ sed "s/^default-expire[[:space:]].*/default-expire $defexpire/" \ > /etc/news/noffle.conf.new chgrp news /etc/news/noffle.conf.new - ucf --three-way /etc/news/noffle.conf.new /etc/news/noffle.conf < /dev/tty + 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 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 - ucf --three-way /etc/default/noffle.new /etc/default/noffle < /dev/tty + 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 rm -f /etc/default/noffle.new db_get noffle/port @@ -61,8 +69,16 @@ db_stop else - ucf --three-way /usr/share/noffle/noffle.conf /etc/news/noffle.conf < /dev/tty - ucf --three-way /usr/share/noffle/conf.debian /etc/default/noffle < /dev/tty + 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 port="`grep "/usr/bin/noffle -r" /etc/inetd.conf 2> /dev/null | sed 's/[[:space:]].*$//'`" || true if [ "$port" ]; then update-inetd --enable "$port"