Changeset 827


Ignore:
Timestamp:
03/23/21 18:28:49 (3 years ago)
Author:
Kris Deugau
Message:

/trunk

Add a couple of configuration variables for BIND-style zone export.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r826 r827  
    33##
    44# $Id$
    5 # Copyright 2008-2019 Kris Deugau <kdeugau@deepnet.cx>
     5# Copyright 2008-2021 Kris Deugau <kdeugau@deepnet.cx>
    66#
    77#    This program is free software: you can redistribute it and/or modify
     
    204204                usecache        => 1,   # do we bother using the cache above?
    205205
     206                # BIND-style zone export
     207                # 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,
     211
    206212                # Session params
    207213                timeout         => '1h',        # passed as-is to CGI::Session
     
    254260  # Several settings are booleans.  Handle multiple possible ways of setting them.
    255261  for my $boolopt ('log_failures', 'force_refresh', 'lowercase', 'usecache',
    256         'template_skip_0', 'template_skip_255', 'autotxt') {
     262        'bind_export_shortlines', 'template_skip_0', 'template_skip_255', 'autotxt') {
    257263    if ($self->{$boolopt} ne '1' && $self->{$boolopt} ne '0') {
    258264      # true/false, on/off, yes/no all valid.
     
    20292035      $cfg->{exportcache}       = $1 if m{^exportcache\s*=\s*([a-z0-9/_.-]+)}i;
    20302036      $cfg->{usecache}          = $1 if m{^usecache\s*=\s*([a-z01]+)}i;
     2037      $cfg->{bind_export_conf_path}   = $1 if m{^bind_export_conf_path\s*=\s*([a-z0-9/_.%-]+)}i;
     2038      $cfg->{bind_export_zone_path}   = $1 if m{^bind_export_zone_path\s*=\s*([a-z0-9/_.%-]+)}i;
     2039      $cfg->{bind_export_shortlines}  = $1 if /^bind_export_shortlines\s*=\s*([a-z01]+)/i;
    20312040      $cfg->{force_refresh}     = $1 if /^force_refresh\s*=\s*([a-z01]+)/i;
    20322041      $cfg->{lowercase}         = $1 if /^lowercase\s*=\s*([a-z01]+)/i;
Note: See TracChangeset for help on using the changeset viewer.