[Pkg-utopia-commits] r3609 - in /packages/unstable/avahi/debian: avahi-dnsconfd.default avahi-dnsconfd.init avahi-dnsconfd.preinst changelog

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Wed Jul 7 20:13:27 UTC 2010


Author: biebl
Date: Wed Jul  7 20:13:25 2010
New Revision: 3609

URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=3609
Log:
Remove AVAHI_DNSCONFD_START option because we start avahi-dnsconfd by
default anyway. As /etc/default/avahi-dnsconfd is now empty, remove it on
upgrades.

Added:
    packages/unstable/avahi/debian/avahi-dnsconfd.preinst
Removed:
    packages/unstable/avahi/debian/avahi-dnsconfd.default
Modified:
    packages/unstable/avahi/debian/avahi-dnsconfd.init
    packages/unstable/avahi/debian/changelog

Modified: packages/unstable/avahi/debian/avahi-dnsconfd.init
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/avahi/debian/avahi-dnsconfd.init?rev=3609&op=diff
==============================================================================
--- packages/unstable/avahi/debian/avahi-dnsconfd.init (original)
+++ packages/unstable/avahi/debian/avahi-dnsconfd.init Wed Jul  7 20:13:25 2010
@@ -25,15 +25,6 @@
 
 . /lib/lsb/init-functions
 
-# don't start if /etc/default/avahi-dnsconfd says so.
-AVAHI_DNSCONFD_START=1
-test -f /etc/default/avahi-dnsconfd && . /etc/default/avahi-dnsconfd
-
-if [ "$AVAHI_DNSCONFD_START" != "1" -a "$1" != "stop" ]; then
-    log_warning_msg "Not starting $DESC $NAME, disabled via /etc/default/$NAME"
-    exit 0
-fi
-
 #
 #       Function that starts the daemon/service.
 #
@@ -47,7 +38,7 @@
 	fi
 	cp -fp /etc/localtime /etc/avahi/etc >/dev/null 2>&1
     fi;
-    
+
     $DAEMON -D
 }
 

Added: packages/unstable/avahi/debian/avahi-dnsconfd.preinst
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/avahi/debian/avahi-dnsconfd.preinst?rev=3609&op=file
==============================================================================
--- packages/unstable/avahi/debian/avahi-dnsconfd.preinst (added)
+++ packages/unstable/avahi/debian/avahi-dnsconfd.preinst Wed Jul  7 20:13:25 2010
@@ -1,0 +1,32 @@
+#!/bin/sh
+
+set -e
+
+# Remove a no-longer used conffile
+rm_conffile() {
+    local PKGNAME="$1"
+    local CONFFILE="$2"
+
+    [ -e "$CONFFILE" ] || return 0
+
+    local md5sum="$(md5sum $CONFFILE | sed -e 's/ .*//')"
+    local 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
+}
+
+case "$1" in
+install|upgrade)
+    if dpkg --compare-versions "$2" lt "0.6.26-1"; then
+        rm_conffile avahi-dnsconfd "/etc/default/avahi-dnsconfd"
+    fi
+esac
+
+#DEBHELPER#

Modified: packages/unstable/avahi/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/avahi/debian/changelog?rev=3609&op=diff
==============================================================================
--- packages/unstable/avahi/debian/changelog (original)
+++ packages/unstable/avahi/debian/changelog Wed Jul  7 20:13:25 2010
@@ -26,6 +26,9 @@
     python dist-packages transition.
   * Bump Standards-Version to 3.9.0. Use architecture wild-card linux-any for
     the libcap-dev Build-Depends and avahi-autoipd.
+  * Remove AVAHI_DNSCONFD_START option because we start avahi-dnsconfd by
+    default anyway. As /etc/default/avahi-dnsconfd is now empty, remove it on
+    upgrades.
 
  -- Michael Biebl <biebl at debian.org>  Wed, 30 Jun 2010 02:47:56 +0200
 




More information about the Pkg-utopia-commits mailing list