- Timestamp:
- Oct 20, 2010, 10:40:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nodes/gformat.py
r8584 r8585 565 565 datadump[iface_key]['subnet'] = netmask2subnet(netmask) 566 566 dhcp_part = ".".join(ip.split('.')[0:3]) 567 wleiden_zone["dhcp-gateway-%s.%s" % (iface_name, fqdn)] = ip 567 if ip != datadump['masterip']: 568 wleiden_zone["dhcp-gateway-%s.%s" % (iface_name, fqdn)] = ip 568 569 for i in range(int(dhcp_start), int(dhcp_stop) + 1): 569 570 wleiden_zone["dhcp-%s-%s.%s" % (i, iface_name, fqdn)] = "%s.%s" % (dhcp_part, i) … … 598 599 599 600 601 f = open("db.wleiden.net", "w") 602 for host,ip in wleiden_zone.iteritems(): 603 f.write("%s.wleiden.net. A %s ~\n" % (host, ip)) 604 for source,dest in wleiden_cname.iteritems(): 605 f.write("%s.wleiden.net. CNAME %s.wleiden.net.\n" % (source, dest)) 606 f.close() 607 f = open("db.172.in-addr.arpa", "w") 608 for host,ip in wleiden_zone.iteritems(): 609 rev_ip = '.'.join(reversed(ip.split('.'))) 610 f.write("%s.in-addr.arpa. PTR %s.wleiden.net. ~\n" % (rev_ip, host)) 611 f.close() 600 612 #pprint(pool) 601 pprint(wleiden_zone)613 #pprint(wleiden_zone) 602 614 #for config in files: 603 615 # items['config'] = config
Note:
See TracChangeset
for help on using the changeset viewer.