[pkg-kolab] r899 - kolabd/branches/2.2/debian

mparent-guest at alioth.debian.org mparent-guest at alioth.debian.org
Sat Jul 12 07:50:07 UTC 2008


Author: mparent-guest
Date: 2008-07-12 07:50:05 +0000 (Sat, 12 Jul 2008)
New Revision: 899

Added:
   kolabd/branches/2.2/debian/preinst
Modified:
   kolabd/branches/2.2/debian/changelog
Log:
debian/preinst: remove unused_conffile /etc/kolab/templates/fbview.conf.template 



Modified: kolabd/branches/2.2/debian/changelog
===================================================================
--- kolabd/branches/2.2/debian/changelog	2008-07-12 07:41:10 UTC (rev 898)
+++ kolabd/branches/2.2/debian/changelog	2008-07-12 07:50:05 UTC (rev 899)
@@ -42,8 +42,10 @@
     http://lists.debian.org/debian-legal/2008/04/msg00087.html
   * debian/postinst: add user cyrus to group kolab. This is needed for PKI.
   * Bump Standards-Version to 3.8.0 (updated Vcs-Browser and Vcs-Svn fields) 
+  * debian/preinst: remove unused_conffile
+    /etc/kolab/templates/fbview.conf.template 
 
- -- Mathieu Parent <math.parent at gmail.com>  Sat, 12 Jul 2008 09:31:52 +0200
+ -- Mathieu Parent <math.parent at gmail.com>  Sat, 12 Jul 2008 09:48:26 +0200
 
 kolabd (2.1.0-20070510.dfsg-3) unstable; urgency=low
 

Added: kolabd/branches/2.2/debian/preinst
===================================================================
--- kolabd/branches/2.2/debian/preinst	                        (rev 0)
+++ kolabd/branches/2.2/debian/preinst	2008-07-12 07:50:05 UTC (rev 899)
@@ -0,0 +1,30 @@
+#! /bin/sh
+
+set -e
+
+# Remove a no-longer used conffile
+rm_conffile() {
+    PKGNAME="$1"
+    CONFFILE="$2"
+    if [ -e "$CONFFILE" ]; then
+        md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
+        old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`"
+        if [ "$md5sum" != "$old_md5sum" ]; then
+            echo "Obsolete conffile $CONFFILE has been modified by you."
+            echo "Saving as $CONFFILE.dpkg-bak ..."
+            mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
+        else
+            echo "Removing obsolete conffile $CONFFILE ..."
+            rm -f "$CONFFILE"
+        fi
+    fi
+}
+case "$1" in
+install|upgrade)
+    if dpkg --compare-versions "$2" le "$LASTVERSION"; then
+        rm_conffile kolabd "/etc/kolab/templates/fbview.conf.template"
+    fi
+esac
+
+#DEBHELPER#
+




More information about the pkg-kolab-devel mailing list