chiark / gitweb /
Allow invocation on 2nd-level domains by coping with superzone `.'
[chiark-utils.git] / scripts / named-conf
index a43e5ab8d151d985e2577cc97498fc609c3ad643..ba36757a41a33b4504e38dbd4bd9b34a38c460d4 100755 (executable)
@@ -360,8 +360,10 @@ sub zone_investigate() {
        $super_zone= $zone;
        for (;;) {
            debug_trace("zone $zone superzone $super_zone");
+           $super_zone eq '.'
+               and die "no superzone ? ($super_zone)\n";
            $super_zone =~ s/^[^.]+\.//
-               or die "no superzone ? ($super_zone)\n";
+               or $super_zone= '.';
            ($rcode,@start_nsnames)=
                lookup($super_zone,'ns-','06',"superzone search");
            last if !$rcode;
@@ -698,7 +700,7 @@ sub lookup ($$$$) {
     defined($c= open $h, "-|") or die "$quis: fork adnshost:\n $!\n";
     if (!$c) {
        exec 'adnshost','-Fi','+Do','+Dt','+Dc','-Cf',"-t$type",
-            '-',"$domain.";
+            '-',"$domain";
        die "$quis: exec adnshost:\n $!\n";
     }
     @result= $h->getlines();