changeset 444:bfdba1698a58 noffle

[svn] update
author godisch
date Wed, 25 Jun 2003 16:58:44 +0100
parents b415fa4d18ee
children 0a5e33528ec1
files debian/postinst debian/postrm debian/preinst
diffstat 3 files changed, 21 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/debian/postinst	Wed Jun 25 16:41:02 2003 +0100
+++ b/debian/postinst	Wed Jun 25 16:58:44 2003 +0100
@@ -1,5 +1,5 @@
-#!/bin/sh
-# $Id: postinst 586 2003-06-25 15:41:02Z godisch $
+#!/bin/sh -x
+# $Id: postinst 587 2003-06-25 15:58:44Z godisch $
 
 set -e
 
@@ -8,27 +8,6 @@
 maxfetch_default=300
 defexpire_default=14
 
-if dpkg --compare-versions "$2" lt-nl 1.1.2-1; then
-	echo
-	echo "/etc/noffle/conf moved to /etc/news/noffle.conf, /etc/noffle/conf.debian"
-	echo "moved to /etc/default/noffle. /etc/noffle and /var/log/noffle are not"
-	echo "used any longer, you may remove them. noffle expiration logs are"
-	echo "still available through syslog."
-	echo
-	sleep 2
-	mv -fb /etc/noffle/conf /etc/news/noffle.conf || true
-	mv -fb /etc/noffle/conf.debian /etc/default/noffle || true
-	mv -fb /etc/noffle/conf.old /etc/news/noffle.conf.old 2> /dev/null || true
-	mv -fb /etc/noffle/conf.debian.old /etc/default/noffle.old 2> /dev/null || true
-	rmdir /etc/noffle 2> /dev/null || true
-fi
-
-if dpkg --compare-versions "$2" eq 1.1.2-1; then
-	# 1.1.2-1 was in unstable only, don't notify
-	mv -fb /etc/noffle.conf /etc/news/noffle.conf || true
-	mv -fb /etc/noffle.conf.old /etc/news/noffle.conf.old 2> /dev/null || true
-fi
-
 if [ -e /usr/share/debconf/confmodule ]; then
 	. /usr/share/debconf/confmodule
 	db_version 2.0
--- a/debian/postrm	Wed Jun 25 16:41:02 2003 +0100
+++ b/debian/postrm	Wed Jun 25 16:58:44 2003 +0100
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: postrm 569 2003-06-20 16:50:22Z godisch $
+# $Id: postrm 587 2003-06-25 15:58:44Z godisch $
 
 set -e
 
@@ -14,7 +14,7 @@
 	rm -f /etc/noffle.conf /etc/noffle.conf.old \
 		/etc/news/noffle.conf /etc/news/noffle.conf.old /etc/news/noffle.conf.dpkg-* \
 		/etc/default/noffle /etc/default/noffle.old /etc/default/noffle.dpkg-*
-	rm -rf /etc/noffle /var/spool/noffle
+	rm -rf /etc/news/noffle.old /etc/noffle /var/spool/noffle
 	if [ -e /usr/share/debconf/confmodule ]; then
 		. /usr/share/debconf/confmodule
 		db_purge
--- a/debian/preinst	Wed Jun 25 16:41:02 2003 +0100
+++ b/debian/preinst	Wed Jun 25 16:58:44 2003 +0100
@@ -1,8 +1,24 @@
 #!/bin/sh
-# $Id: preinst 543 2003-06-03 21:26:47Z godisch $
+# $Id: preinst 587 2003-06-25 15:58:44Z godisch $
 
 set -e
 
+mkdir -p /etc/news
+
+if [ ! -e /etc/news/noffle.conf ]; then
+	if [ -e /etc/noffle/noffle.conf ]; then
+		mv -fb /etc/noffle/noffle.conf /etc/news
+	elif [ -e /etc/noffle.conf ]; then
+		mv -fb /etc/noffle.conf /etc/news
+	fi
+fi
+
+if [ -e /etc/noffle/conf.debian -a ! -e /etc/default/noffle ]; then
+	mv -fb /etc/noffle/conf.debian /etc/default/noffle
+fi
+
+mv /etc/noffle /etc/news/noffle.old
+
 if [ -d /var/spool/noffle/lock ]; then
 	if [ -d /var/lock/noffle ]; then
 		rm -rf /var/spool/noffle/lock