Changeset 13761 in genesis for tools


Ignore:
Timestamp:
Jan 21, 2017, 11:43:16 PM (8 years ago)
Author:
rick
Message:

Redundency support, in case local DNS server is not running/responding
properly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r13735 r13761  
    500500def generate_dhcpd_conf(datadump):
    501501  """ Generate config file '/usr/local/etc/dhcpd.conf """
     502  # Redundency support, in cause local DNS server is not running/responding.
     503  datadump['autogen_domain_name_servers'] = [datadump['masterip']] + [x[1] for x in get_neighbours(datadump)]
    502504  output = generate_header(datadump)
    503505  output += Template("""\
    504506# option definitions common to all supported networks...
    505507option domain-name "dhcp.{{ autogen_fqdn }}";
     508
     509option domain-name-servers {{ autogen_domain_name_servers|join(", ") }};
    506510
    507511default-lease-time 600;
     
    576580        range %(autogen_dhcp_start)s %(autogen_dhcp_stop)s;
    577581        option routers %(autogen_addr)s;
    578         option domain-name-servers %(autogen_addr)s;
    579582      }
    580583      """ % datadump[iface_key]))
Note: See TracChangeset for help on using the changeset viewer.