Changeset 901


Ignore:
Timestamp:
08/11/25 16:34:14 (3 hours ago)
Author:
Kris Deugau
Message:

/trunk

Unravel the BIND export options, make them a consistent group, and scrap
extras that aren't used

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r897 r901  
    205205
    206206                # BIND-style zone export
     207                bind_export_conf_path   => 'zones.conf',
    207208                # should arguably inherit something from BIND defaults for /var/named?
    208                 bind_export_zone_path   => 'zones/',
    209                 bind_export_conf_path   => 'zones.conf',
    210                 bind_export_shortlines  => 0,
     209                bind_export_zone_path   => 'zones/db.%zone',
     210                # just in case someone wants reverse zones separate from forward zones
     211                bind_export_zone_path   => 'zones/db.%zone',
     212                bind_export_fqdn        => 1,
    211213                bind_export_autoexpire_ttl      => 15,
    212214
     
    261263  # Several settings are booleans.  Handle multiple possible ways of setting them.
    262264  for my $boolopt ('log_failures', 'force_refresh', 'lowercase', 'usecache',
    263         'bind_export_shortlines', 'template_skip_0', 'template_skip_255', 'autotxt') {
     265        'bind_export_fqdn', 'template_skip_0', 'template_skip_255', 'autotxt') {
    264266    if ($self->{$boolopt} ne '1' && $self->{$boolopt} ne '0') {
    265267      # true/false, on/off, yes/no all valid.
     
    22142216      $cfg->{bind_export_conf_path}   = $1 if m{^bind_export_conf_path\s*=\s*([a-z0-9/_.%-]+)}i;
    22152217      $cfg->{bind_export_zone_path}   = $1 if m{^bind_export_zone_path\s*=\s*([a-z0-9/_.%-]+)}i;
    2216       $cfg->{bind_export_shortlines}  = $1 if /^bind_export_shortlines\s*=\s*([a-z01]+)/i;
     2218      $cfg->{bind_export_reverse_zone_path}     = $1 if m{^bind_export_reverse_zone_path\s*=\s*([a-z0-9/_.%-]+)}i;
     2219      $cfg->{bind_export_fqdn}  = $1 if /^bind_export_fqdn\s*=\s*([a-z01]+)/i;
    22172220      $cfg->{bind_export_autoexpire_ttl} = $1 if /^bind_export_autoexpire_ttl\s*=\s*(\d+)/;
    22182221      $cfg->{force_refresh}     = $1 if /^force_refresh\s*=\s*([a-z01]+)/i;
  • trunk/DNSDB/ExportBIND.pm

    r900 r901  
    44##
    55# $Id$
    6 # Copyright 2022,2023 Kris Deugau <kdeugau@deepnet.cx>
     6# Copyright 2022-2025 Kris Deugau <kdeugau@deepnet.cx>
    77#
    88#    This program is free software: you can redistribute it and/or modify
     
    419419  # at figuring out which zones are visible/present in which views
    420420  if ($viewlist) {
    421     my $tmpconf = "$dnsdb->{bind_zone_conf}.$$"; ##fixme:  split filename for prefixing
     421    my $tmpconf = "$dnsdb->{bind_export_conf_path}.$$"; ##fixme:  split filename for prefixing
    422422    open BINDCONF, ">", $tmpconf;
    423423
     
    445445#      print "};\n\n";
    446446    } # foreach @$viewlist
    447     rename $tmpconf, $dnsdb->{bind_zone_conf};
     447    rename $tmpconf, $dnsdb->{bind_export_conf_path};
    448448  } # if $viewlist
    449449
  • trunk/dnsdb.conf

    r891 r901  
    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
     31# Config fragment populated by exports from dnsadmin
     32#bind_export_zone_conf = /var/named/zones.conf
     33# Forward zone file path template
    3434#bind_export_zone_path = /var/named/zones/%view/db.%zone
    35 # because they're fish of a different colour
    36 #bind_export_reverse_zone_path = /var/named/zones/%view/db.%arpazone
    37 # export all hostnames as full dot-terminated FQDNs?
     35# Reverse zone file path template
     36#bind_export_reverse_zone_path = /var/named/zones/%view/db.%zone
     37# Export all hostnames as full dot-terminated FQDNs?
    3838#bind_export_fqdn = 1
    3939# Short TTL for "autoexpiry" of records.  Values between 1 and 10 or so may
Note: See TracChangeset for help on using the changeset viewer.