chiark / gitweb /
Usage message includes copyright and warranty; also specified zones operation mode.
[chiark-utils.git] / scripts / named-conf
index 212cc8b1fa853a493a4fbb1f135f5b3b34f6ebeb..a031e32639306fc31a65fd775d2550a4e50e3bbb 100755 (executable)
@@ -65,22 +65,29 @@ usageerr("must specify either -f|-y|-n or zones (and not both)")
     if !!$mode == !!@ARGV;
 
 sub usageerr ($) {
-    die
-"$_[0]
-usage: named-conf-regen [options] -f|-y|-n|<zone>...\n".
-"operation modes:\n".
-" -f --force   install without checking\n".
-" -y --yes     check and install\n".
-" -n --no      check only\n".
-"additional options:\n".
-" -A --all       report on zones marked ? (ones we know are broken)\n".
-" -D             debug $quis (does not help debug your DNS config)\n".
-" -g --glueless  do not warn about any glueless referrals (not recommended)\n".
-" -l --localonly full checks only on zones which we primary\n".
-" -q --quiet     no output for OK zones\n".
-" -r --repeat    repeat warnings for all sources of imperfect data\n".
-" -v --verbose   extra verbose info about each zone\n".
-" -C|--config <DIR/FILE  use FILE as default config and DIR as default dir\n";
+    die <<END;
+$_[0]
+
+usage: chiark-named-conf [options] -f|-y|-n|<zone>...
+operation modes:
+ -f --force   install without checking
+ -y --yes     check and install
+ -n --no      check only (configured zones)
+ <zone> ...   check only (specified zones, even unconfigured ones)
+additional options:
+ -A --all       report on zones marked ? (ones we know are broken)
+ -D             debug $quis (does not help debug your DNS config)
+ -g --glueless  do not warn about any glueless referrals (not recommended)
+ -l --localonly full checks only on zones which we primary
+ -q --quiet     no output for OK zones
+ -r --repeat    repeat warnings for all sources of imperfect data
+ -v --verbose   extra verbose info about each zone
+ -C|--config <DIR/FILE  use FILE as default config and DIR as default dir
+
+chiark-named-conf is Copyright 2002 Ian Jackson.  It is Free software, under
+the GNU General Public License, and you are welcome to change it and/or
+distribute copies under certain conditions.  There is ABSOLUTELY NO WARRANTY.
+END
 }
 
 cfg_fail("config filename $etcfile should not be directory")
@@ -391,7 +398,7 @@ sub zone_investigate() {
 
 sub zone_check_nsrrset ($$$$) {
     my ($uaddr,$wa, $name_if_auth, $glueless_ok) = @_;
-    my (@s, $s, %s2g, @glue, $glue, $delgs_or_auths, $wwn, $ww);
+    my (@s, $s, $a, %s2g, @glue, $glue, $delgs_or_auths, $wwn, $ww);
     my ($rcode);
     $ww= "[$uaddr] $wa";
     verbose("checking delegation by $ww");
@@ -423,6 +430,11 @@ sub zone_check_nsrrset ($$$$) {
                       grep { has_suffix_of($s,".$_"); }
                           @{ $cfg->{'conv_glueless'} };
            ($rcode,@glue)= lookup($s,'a','0',"glueless NS from $ww");
+           foreach $a (@glue) {
+               $wwn= "glueless NS from $ww";
+               push @to_check, $a, "$s, $wwn", $s, 0;
+               zone_server_addr($a,$s,$wwn,"NS [$uaddr]",0);
+           }
        }
        $glue= join ' ', sort @glue;
        push @{ $glue{$s}{$glue} }, $ww;
@@ -498,7 +510,7 @@ sub zone_check_soa ($$$$) {
             $zone,'soa',$uaddr);
     $lame= 'broken' if !$lame && !defined $origin;
     if ($lame) { zone_warning("$lame server [$uaddr]",$wa); return; }
-    progress(2, sprintf "%-16s %34s has %s%s",
+    progress(2, sprintf "%-16s %46s has %s%s",
             $zone, "$name [$uaddr]", $serial, $is_ns ? '' : '*');
     push @{ $soas{$got} }, $ww;
     ($rcode,@soa_addrs)= lookup($origin,'a','0',"SOA ORIGIN");