]> granicus.if.org Git - pdns/commitdiff
debian-auth: Fix upgrades with default configuration
authorChristian Hofstaedtler <zeha@debian.org>
Sun, 25 Oct 2015 15:21:09 +0000 (15:21 +0000)
committerChristian Hofstaedtler <christian@hofstaedtler.name>
Mon, 26 Oct 2015 16:05:40 +0000 (17:05 +0100)
The postinst script used to do a "grep include" on pdns.conf, which
in older versions would work (mostly), because the default config
only had a single "include=" entry. Now this is no longer true,
so remove that. Also, changing the include directory would have
never worked.

Git-Dch: full
Closes: #798773
build-scripts/debian-authoritative/pdns-server.postinst

index 5e57e6dc06698aef23b9bcd0076c75361430665d..99f04a6582c21a4b6fe3383020936932682689d4 100644 (file)
@@ -16,12 +16,7 @@ PKGNAME="pdns-server"
 
 PDNSCONF=/etc/powerdns/pdns.conf
 PDNSDEFAULT=/etc/default/pdns
-if [ -e $PDNSCONF ]; then
-  PDNSDIR=`cat $PDNSCONF | grep include | awk -F '=' '{print $2}'`
-fi
-if [ -z "$PDNSDIR" ]; then
-  PDNSDIR=/etc/powerdns/pdns.d
-fi
+PDNSDIR=/etc/powerdns/pdns.d
 PDNSLOCAL=$PDNSDIR/pdns.local.conf
 
 # Temporary files
@@ -121,7 +116,7 @@ case "$1" in
       [ -d $PDNSDIR ] && chmod 0755 $PDNSDIR
       [ -e $PDNSDEFAULT ] && chmod 0644 $PDNSDEFAULT
     fi
-    
+
     # If we still have the default config, make sure bindbackend.conf exists
     PDNSBIND="/etc/powerdns/pdns.d/pdns.simplebind.conf"
     PDNSBINDBACKENDCONF="/etc/powerdns/bindbackend.conf"