From 721fb00a4be3b8b96abe259d131c26f0f1bff985 Mon Sep 17 00:00:00 2001 From: ianmdlvl Date: Wed, 2 Jan 2002 21:24:17 +0000 Subject: [PATCH] Fix problems with primary-dir --- scripts/named-conf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/named-conf b/scripts/named-conf index 4426116..f6c518b 100755 --- 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; - 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)) { @@ -207,7 +207,10 @@ sub zone_conf ($$$$$@) { 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 @@ -474,8 +477,8 @@ sub zone_servers_ok () { } } if ($cfg->{'s'} =~ m/s/ && !$delg_to_us) { - zone_warnmore("we are supposedly published secondary,". - " but not listed as a nameserver"); + zone_warning("we are supposedly published secondary,". + " but not listed as a nameserver"); } } -- 2.30.2