convert hostnames to lowercase
This commit is contained in:
parent
79eb79f46c
commit
0616e22e0c
16
dyndomain
16
dyndomain
@ -28,16 +28,16 @@ def load_conf():
|
||||
zone_filename = conf['Files']['zonefile']
|
||||
log_filename = conf['Files']['logfile']
|
||||
|
||||
wan_hostname = conf['Wan']['hostname']
|
||||
zone_domain = conf['Zone']['domain']
|
||||
zone_subdomain = conf['Zone']['subdomain']
|
||||
wan_hostname = conf['Wan']['hostname'].lower()
|
||||
zone_domain = conf['Zone']['domain'].lower()
|
||||
zone_subdomain = conf['Zone']['subdomain'].lower()
|
||||
mail_from = conf['Mail']['from']
|
||||
mail_to = conf['Mail']['to']
|
||||
mail_ignore_list = [ host for host in conf['MailIgnore'] ]
|
||||
|
||||
hosts_list = [ host for host in conf['Hosts'] ]
|
||||
hosts_ipv4_nat_list = [ host for host in conf['NatHosts'] ]
|
||||
hosts_alias_list = conf['Aliases']
|
||||
hosts_list = [ host.lower() for host in conf['Hosts'] ]
|
||||
hosts_ipv4_nat_list = [ host.lower() for host in conf['NatHosts'] ]
|
||||
hosts_alias_list = [ h.lower() for h in conf['Aliases'] ]
|
||||
|
||||
|
||||
def ping(hostname):
|
||||
@ -53,7 +53,7 @@ def get_ipv6_hosts():
|
||||
for h in r['status']:
|
||||
if not 'IPv6Address' in h or not h['IPv6Address']:
|
||||
continue
|
||||
hostname = h['Name']
|
||||
hostname = h['Name'].lower()
|
||||
if hostname in hosts_alias_list:
|
||||
hostname = hosts_alias_list[hostname]
|
||||
for a in h['IPv6Address']:
|
||||
@ -105,7 +105,7 @@ def read_zone_list_from_file(zone_filename):
|
||||
for host in config:
|
||||
for p in config[host]:
|
||||
for target in config[host][p].split('\n'):
|
||||
zone_list.append([host, p.upper(), target])
|
||||
zone_list.append([host.lower(), p.upper(), target])
|
||||
return zone_list
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user