- maknut query-source kao direktiva viska
[bind9-cn.git] / debian / postinst
index 49b83ca..4b0b4c8 100755 (executable)
@@ -73,7 +73,6 @@ acl "trusted" {
 
 options {
     directory "/etc/bind";
-    query-source address * port 53;
     auth-nxdomain no;
     allow-transfer { xfer; };
     allow-recursion { trusted; };
@@ -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.