From: Christian Hofstaedtler Date: Sun, 25 Oct 2015 15:21:09 +0000 (+0000) Subject: debian-auth: Fix upgrades with default configuration X-Git-Tag: dnsdist-1.0.0-alpha1~230^2~30^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5b28b2f1aec7a859824291b1cd1e35e5b4b49005;p=pdns debian-auth: Fix upgrades with default configuration 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 --- diff --git a/build-scripts/debian-authoritative/pdns-server.postinst b/build-scripts/debian-authoritative/pdns-server.postinst index 5e57e6dc0..99f04a658 100644 --- a/build-scripts/debian-authoritative/pdns-server.postinst +++ b/build-scripts/debian-authoritative/pdns-server.postinst @@ -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"