chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix problems with primary-dir
[chiark-utils.git]
/
scripts
/
named-conf
diff --git
a/scripts/named-conf
b/scripts/named-conf
index 44261169a5b2978fc2ba376d2b759b669051c05d..f6c518b4f7d3161f632a67cef5996783ccb63419 100755
(executable)
--- a/
scripts/named-conf
+++ b/
scripts/named-conf
@@
-151,7
+151,7
@@
sub read_config ($) {
$suffix= '' if !defined $suffix;
$subfile= '' if !defined $subfile;
$suffix= '_db' if !length $suffix && !length $subfile;
$suffix= '' if !defined $suffix;
$subfile= '' if !defined $subfile;
$suffix= '_db' if !length $suffix && !length $subfile;
- if (-d "$dir
$prefix") {
$dir.=$prefix; $prefix=''; }
+ if (-d "$dir
/$prefix") { $dir.='/';
$dir.=$prefix; $prefix=''; }
opendir D, $dir or cfg_fail("open primary-dir $dir:\n $!");
$lprefix= length $prefix; $lsuffix= length $suffix;
while (defined($_= readdir D)) {
opendir D, $dir or cfg_fail("open primary-dir $dir:\n $!");
$lprefix= length $prefix; $lsuffix= length $suffix;
while (defined($_= readdir D)) {
@@
-207,7
+207,10
@@
sub zone_conf ($$$$$@) {
unless length $default_output;
set_output($default_output);
}
unless length $default_output;
set_output($default_output);
}
- cfg_fail("redefined zone $zone") if exists $zone_cfg{$zone};
+ cfg_fail("redefined zone $zone\n".
+ " earlier definition $zone_cfg{$zone}{'where'}")
+ if exists $zone_cfg{$zone};
+ $zone_cfg{$zone}{'where'}= $where;
$zone_cfg{$zone}{'file'}= $file;
$zone_cfg{$zone}{'style_p'}= $style.$mod;
$zone_cfg{$zone}{'s'}= $sabbr.$mod; # p)rimary s)econdary u)npub f)oreign
$zone_cfg{$zone}{'file'}= $file;
$zone_cfg{$zone}{'style_p'}= $style.$mod;
$zone_cfg{$zone}{'s'}= $sabbr.$mod; # p)rimary s)econdary u)npub f)oreign
@@
-474,8
+477,8
@@
sub zone_servers_ok () {
}
}
if ($cfg->{'s'} =~ m/s/ && !$delg_to_us) {
}
}
if ($cfg->{'s'} =~ m/s/ && !$delg_to_us) {
- zone_warn
more
("we are supposedly published secondary,".
-
" but not listed as a nameserver");
+ zone_warn
ing
("we are supposedly published secondary,".
+ " but not listed as a nameserver");
}
}
}
}