X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=4b0b4c8b51ed2ae771552051185b0c495c442081;hb=cfa22dd36fb4be0f50a2587c3558cc44288d28f2;hp=d5f2e77217a67807a3e30e9f09f558911a8046a6;hpb=18584c660c54af3b2c3821e0059f023006a53151;p=bind9-cn.git diff --git a/debian/postinst b/debian/postinst index d5f2e77..4b0b4c8 100755 --- a/debian/postinst +++ b/debian/postinst @@ -73,7 +73,6 @@ acl "trusted" { options { directory "/etc/bind"; - query-source address * port 53; auth-nxdomain no; allow-transfer { xfer; }; allow-recursion { trusted; }; @@ -153,10 +152,10 @@ EOF script='/^logging/,/^}/ { if ($0 ~ /category lame-servers/) { print "yes"; exit } }' lameconf= if [ -e /etc/bind/named.conf.options -a -e /etc/bind/named.conf ]; then - lameconf=$(cat /etc/bind/named.conf /etc/bind/named.conf.options | awk $script) + lameconf=$(cat /etc/bind/named.conf /etc/bind/named.conf.options | awk "$script") else if [ -e /etc/bind/named.conf ]; then - lameconf=$(awk $script /etc/bind/named.conf) + lameconf=$(awk "$script" /etc/bind/named.conf) fi fi if [ "x$lameconf" != "xyes" ]; then @@ -176,6 +175,16 @@ EOF rndc reload || echo "CN: Reload didn't work, please check manually" fi +if [ -e /etc/bind/named.conf.options ] && \ + fgrep -q 'query-source address * port 53' \ + /etc/bind/named.conf.options; then + fgrep -v 'query-source address * port 53' \ + /etc/bind/named.conf.options > /etc/bind/named.conf.options.$$ + cp_mv /etc/bind/named.conf.options.$$ /etc/bind/named.conf.options + echo "CN: Removing obsolete query-source directive" + rndc reload || echo "CN: Reload didn't work, please check manually" +fi + # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts.