Changeset 860


Ignore:
Timestamp:
09/15/22 18:10:35 (2 years ago)
Author:
Kris Deugau
Message:

/trunk

BIND export, unwinding dev saves, 12 of many many

  • Improve zone file docucomment header with an export timestamp
  • Sketch out NS record printing
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB/ExportBIND.pm

    r859 r860  
    9494          $zfilepath =~ s,[^\w./-],_,g;
    9595          open $zonefiles{$loc}, ">", $zfilepath;
    96           print {$zonefiles{$loc}} "; $arpazone in view $loc\n";
     96          printf {$zonefiles{$loc}} "; %s in view %s exported %s\n", $arpazone, $loc, scalar(localtime);
    9797print "open zonefile for '$loc', '$zfilepath'\n";
    9898        }
     
    249249  } # SOA
    250250
     251  elsif ($typemap{$type} eq 'NS') {
     252    if ($revrec eq 'y') {
     253      $val = NetAddr::IP->new($val);
     254
     255##fixme:  conversion for sub-/24 delegations in reverse zones?
     256#      if (!$val->{isv6} && ($val->masklen > 24)) {
     257#      }
     258
     259#      print {$zonefiles->{$loc}} "$zone       $ttl    IN      NS      $host\n";
     260      print "$zone     $ttl    IN      NS      $host\n";
     261
     262    } else {
     263#      print $datafile "\&$host"."::$val:$ttl:$stamp:$loc\n" or die $!;
     264    }
     265  } # NS
     266
     267
    251268} # printrec_bind()
    252269
Note: See TracChangeset for help on using the changeset viewer.