Release openresolv-1.7.1
[openresolv] / named.in
index d002e1e4110b1516d5d872c00f387748cda8cf5d..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
 
@@ -79,7 +78,7 @@ for N in ${NEWNS}; do
        esac
 done
 if [ -n "${FORWARD}" ]; then
-       NEWOPTIONS="${NEWOPTIONS}\nforward first;\nforwarders {${FORWARD}\n};\n"
+       NEWOPTIONS="${NEWOPTIONS}forward first;\nforwarders {${FORWARD}\n};\n"
 fi
 
 LASTDN=
@@ -88,8 +87,9 @@ for DN in $(printf "%s\n" ${NEWDOMAIN} | sort -u); do
        case "${LASTDN}" in
                "${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 {"