};
zone_warning("checks failed: $@") if length $@;
}
- zone_output() if $install;
+ $output_contents{$$cfg{'output'}} .= zone_output()
+ if $install;
}
print STDERR "$quis: $warnings warnings\n" or die $!
if $warnings;
#-------------------- outputting
sub zone_output () {
- $output_contents{$$cfg{'output'}}.=
- sprintf(<<'END',
-zone "%s" {
- type %s;
- file "%s";
-};
-END
- $zone,
- $$cfg{'s'} =~ m/p/ ? 'master' : 'slave',
- $$cfg{'file'});
+ my ($o);
+
+ $o= "zone \"$zone\" {\n";
+ if ($$cfg{'s'} =~ m/p/) {
+ $o.= " type master\n";
+ } else {
+ $o.= " type slave\n".
+ " masters {\n";
+ foreach $m (@{ $cfg{'servers'} }) { $o.= " $m;\n"; }
+ $o.= " };\n";
+ }
+ return $o;
}
sub output_files () {