Changeset 857 for trunk


Ignore:
Timestamp:
09/15/22 17:21:00 (2 years ago)
Author:
Kris Deugau
Message:

/trunk

BIND export, unwinding dev saves, 9 of many many

  • Lay out a couple more BIND export configuration options
  • Start using the zone/view list configuration fragment to create a file
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB/ExportBIND.pm

    r856 r857  
    181181  # at figuring out which zones are visible/present in which views
    182182  if ($viewlist) {
     183    my $tmpconf = "$dnsdb->{bind_zone_conf}.$$"; ##fixme:  split filename for prefixing
     184    open BINDCONF, ">", $tmpconf;
     185
    183186    foreach my $view (@{$viewlist}) {
    184187#print Dumper($view);
    185 #      print BINDCONF "view $view->{location} {\n";
    186       print "view $view->{location} {\n";
     188      print BINDCONF "view $view->{location} {\n";
     189#      print "view $view->{location} {\n";
    187190      # could also use an acl { ... }; statement, then match-clients { aclname; };, but that gets hairy
    188191      # note that some semantics of data visibility need to be handled by the record export, since it's
     
    190193      # same as a BIND view with match-clients { any; };
    191194      if ($view->{iplist}) {
    192 #         print BINDCONF "  match-clients { ".join("; ", $view->iplist)."; };\n";
    193          print "  match-clients { ".join("; ", split(/[\s,]+/, $view->{iplist}))."; };\n";
     195         print BINDCONF "  match-clients { ".join("; ", $view->iplist)."; };\n";
     196#         print "  match-clients { ".join("; ", split(/[\s,]+/, $view->{iplist}))."; };\n";
    194197      } else {
    195 #         print BINDCONF "  match-clients { any; };\n";
    196          print "  match-clients { any; };\n";
     198         print BINDCONF "  match-clients { any; };\n";
     199#         print "  match-clients { any; };\n";
    197200      }
    198201      foreach my $zone (@{$viewzones{$view->{location}}}) {
     
    202205      print "};\n\n";
    203206    } # foreach @$viewlist
     207    rename $tmpconf, $dnsdb->{bind_zone_conf};
    204208  } # if $viewlist
    205209
  • trunk/dnsdb.conf

    r856 r857  
    2929
    3030## BIND export options
     31# config fragment populated by exports from dnsadmin
     32#bind_zone_conf = /var/named/zones.conf
     33# forward zone path
    3134#bind_export_zone_path = /var/named/zones/%view/db.%zone
    3235# because they're fish of a different colour
    3336#bind_export_reverse_zone_path = /var/named/zones/%view/db.%arpazone
     37# export all hostnames as full dot-terminated FQDNs?
     38#bind_export_fqdn = 1
    3439
    3540## DNS data template options
Note: See TracChangeset for help on using the changeset viewer.