Release openresolv-1.7.1
[openresolv] / named.in
index 91ebc8cd8d5ee4ee8c30307cf4b35f34ce9f1580..1b3801b25fdc400e8b0566e62fe8528371ee6b78 100755 (executable)
--- a/named.in
+++ b/named.in
@@ -1,5 +1,4 @@
 #!/bin/sh
-# Copyright 2006 Gentoo Foundation
 # Copyright 2007 Roy Marples <roy@marples.name>
 # All rights reserved
 
@@ -68,28 +67,29 @@ NEWZONES="${NEWOPTIONS}"
 FORWARD=
 for N in ${NEWSEARCH}; do
        case "${FORWARD}" in
-               *"\n\t${N#*,};"*) ;;
+               *"\n\t${N#*,};"*);;
                *) FORWARD="${FORWARD}\n\t${N#*,};";;
        esac
 done
 for N in ${NEWNS}; do
        case "${FORWARD}" in
-               *"\n\t${N};"*) ;;
+               *"\n\t${N};"*);;
                *) FORWARD="${FORWARD}\n\t${N};";;
        esac
 done
 if [ -n "${FORWARD}" ]; then
-       NEWOPTIONS="${NEWOPTIONS}\nforward first;\nforwarders {${FORWARD}\n};\n"
+       NEWOPTIONS="${NEWOPTIONS}forward first;\nforwarders {${FORWARD}\n};\n"
 fi
 
 LASTDN=
 ZONES=
 for DN in $(printf "%s\n" ${NEWDOMAIN} | sort -u); do
        case "${LASTDN}" in
-               "${DN%,*}") ;;
+               "${DN%,*}");;
                *)
-               [ -n "${ZONES}" ] && ZONES="${NEWZONES}\n\t};\n};\n"
-               ZONES="${ZONES}\nzone \"${DN%,*}\" {\n"
+               LASTDN="${DN%,*}"
+               [ -n "${ZONES}" ] && ZONES="${ZONES}\n\t};\n};\n"
+               ZONES="${ZONES}zone \"${LASTDN}\" {\n"
                ZONES="${ZONES}\ttype forward;\n"
                ZONES="${ZONES}\tforward first;\n"
                ZONES="${ZONES}\tforwarders {"