chiark / gitweb /
Bugfixes.
authorianmdlvl <ianmdlvl>
Wed, 2 Jan 2002 22:58:29 +0000 (22:58 +0000)
committerianmdlvl <ianmdlvl>
Wed, 2 Jan 2002 22:58:29 +0000 (22:58 +0000)
scripts/named-conf

index 3dfe87f142d3f39894347d99cc82a7385a9b8e72..047e9ea2da5c1e3982e149aa2ce675418f4aaa01 100755 (executable)
@@ -177,6 +177,8 @@ sub read_config ($) {
            zone_conf($2,'stealth','u',$1,'',split /\s+/, $3);
        } elsif (m/^slave\-dir\s+(\S+)(?:(?:\s+(\S+))\s+(\S+))?$/) {
            ($slave_dir, $slave_prefix, $slave_suffix) = (qualify($1),$2,$3);
            zone_conf($2,'stealth','u',$1,'',split /\s+/, $3);
        } elsif (m/^slave\-dir\s+(\S+)(?:(?:\s+(\S+))\s+(\S+))?$/) {
            ($slave_dir, $slave_prefix, $slave_suffix) = (qualify($1),$2,$3);
+           $slave_prefix='' if !defined $slave_prefix;
+           $slave_suffix='' if !defined $slave_suffix;
        } elsif (m/^output\s+bind8\+(\S+)$/) {
            cfg_fail("default output may not apply to only some zones")
                if @zone_cfg_list && length $default_output;
        } elsif (m/^output\s+bind8\+(\S+)$/) {
            cfg_fail("default output may not apply to only some zones")
                if @zone_cfg_list && length $default_output;
@@ -522,17 +524,19 @@ sub zone_server_simple ($$$) {
 #-------------------- outputting
 
 sub zone_output () {
 #-------------------- outputting
 
 sub zone_output () {
-    my ($o);
+    my ($o,$m);
 
     $o= "zone \"$zone\" {\n";
     if ($$cfg{'s'} =~ m/p/) {
 
     $o= "zone \"$zone\" {\n";
     if ($$cfg{'s'} =~ m/p/) {
-       $o.= "    type master\n";
+       $o.= "    type master;\n";
     } else {
     } else {
-       $o.= "    type slave\n".
+       $o.= "    type slave;\n".
             "    masters {\n";
             "    masters {\n";
-       foreach $m (@{ $cfg{'servers'} }) { $o.= "        $m;\n"; }
+       foreach $m (@{ $$cfg{'servers'} }) { $o.= "        $m;\n"; }
        $o.= "    };\n";
     }
        $o.= "    };\n";
     }
+    $o.= "    file \"$$cfg{'file'}\";\n";
+    $o.= "};\n";
     return $o;
 }
 
     return $o;
 }