- Timestamp:
- May 8, 2012, 10:13:26 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r10729 r10730 1031 1031 if datadump['nodetype'] in ['CNode', 'Hybrid']: 1032 1032 wleiden_cname[datadump['nodename']] = fqdn 1033 1034 if datadump.has_key('rdr_host'): 1035 remote_target = datadump['rdr_host'] 1036 elif datadump.has_key('remote_access') and datadump['remote_access']: 1037 remote_target = datadump['remote_access'].split(':')[0] 1038 else: 1039 remote_target = None 1040 1041 if remote_target: 1042 try: 1043 parseaddr(remote_target) 1044 wleiden_zone[datadump['nodename'] + '.gw'].append((remote_target, False)) 1045 except (IndexError, ValueError): 1046 wleiden_cname[datadump['nodename'] + '.gw'] = remote_target + '.' 1047 1033 1048 1034 1049 wleiden_zone[fqdn].append((datadump['masterip'], True)) … … 1175 1190 for host,items in wleiden_zone.iteritems(): 1176 1191 for ip,reverse in items: 1177 if valid_addr(ip):1192 if ip not in ['0.0.0.0']: 1178 1193 f.write("%s.wleiden.net. IN A %s \n" % (host.lower(), ip)) 1179 1194 for source,dest in wleiden_cname.iteritems(): 1180 f.write("%s.wleiden.net. IN CNAME %s.wleiden.net.\n" % (source.lower(), dest.lower())) 1195 dest = dest if dest.endswith('.') else dest + ".wleiden.net." 1196 f.write("%s.wleiden.net. IN CNAME %s\n" % (source.lower(), dest.lower())) 1181 1197 for source, dest in wleiden_raw.iteritems(): 1182 1198 f.write("%s.wleiden.net. %s\n" % (source, dest))
Note:
See TracChangeset
for help on using the changeset viewer.