]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/initscripts/system/unbound
ipvsadm: Update to 1.29
[ipfire-2.x.git] / src / initscripts / system / unbound
index a46999992a2b99b91cfe3d7b8b2466614dda3d24..cc46c33c9425cc85d95b1d7412a9db3e146fea4b 100644 (file)
@@ -214,16 +214,16 @@ write_forward_conf() {
                        case "${zone}" in
                                *.in-addr.arpa)
                                        echo "stub-zone:"
-                                       echo "  name: ${zone}."
+                                       echo "  name: ${zone}"
                                        echo "  stub-addr: ${server}"
                                        echo
                                        echo "server:"
-                                       echo "  local-zone: \"${zone}.\" transparent"
+                                       echo "  local-zone: \"${zone}\" transparent"
                                        echo
                                        ;;
                                *)
                                        echo "forward-zone:"
-                                       echo "  name: ${zone}."
+                                       echo "  name: ${zone}"
                                        echo "  forward-addr: ${server}"
                                        echo
                                        ;;
@@ -378,7 +378,12 @@ ns_is_validating() {
        local ns=${1}
        shift
 
-       dig @${ns} A ${TEST_DOMAIN_FAIL} $@ | grep -q SERVFAIL
+       if ! dig @${ns} A ${TEST_DOMAIN_FAIL} $@ | grep -q SERVFAIL; then
+               return 1
+       else
+               # Determine if NS replies with "ad" data flag if DNSSEC enabled
+               dig @${ns} +dnssec SOA ${TEST_DOMAIN} $@ | awk -F: '/\;\;\ flags\:/ { s=1; if (/\ ad/) s=0; exit s }'
+       fi
 }
 
 # Checks if we can retrieve the DNSKEY for this domain.
@@ -474,7 +479,7 @@ fix_time_if_dns_fail() {
        if [ -e /var/ipfire/red/active ]; then
                host 0.ipfire.pool.ntp.org > /dev/null 2>&1
                if [ "${?}" != "0" ]; then
-                       boot_mesg "DNS still not work ... init time with ntp.ipfire.org at 81.3.27.46 ..."
+                       boot_mesg "DNS still not functioning... Trying to sync time with ntp.ipfire.org (81.3.27.46)..."
                        loadproc /usr/local/bin/settime 81.3.27.46
                fi
        fi