chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
721fb00
)
Output master IP addrs.
author
ianmdlvl
<ianmdlvl>
Wed, 2 Jan 2002 22:19:27 +0000
(22:19 +0000)
committer
ianmdlvl
<ianmdlvl>
Wed, 2 Jan 2002 22:19:27 +0000
(22:19 +0000)
scripts/named-conf
patch
|
blob
|
history
diff --git
a/scripts/named-conf
b/scripts/named-conf
index f6c518b4f7d3161f632a67cef5996783ccb63419..3dfe87f142d3f39894347d99cc82a7385a9b8e72 100755
(executable)
--- a/
scripts/named-conf
+++ b/
scripts/named-conf
@@
-270,7
+270,8
@@
sub process_zones (@) {
};
zone_warning("checks failed: $@") if length $@;
}
};
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;
}
print STDERR "$quis: $warnings warnings\n" or die $!
if $warnings;
@@
-521,16
+522,18
@@
sub zone_server_simple ($$$) {
#-------------------- outputting
sub zone_output () {
#-------------------- 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 () {
}
sub output_files () {