Changeset 10934 in genesis
- Timestamp:
- May 20, 2012, 1:10:59 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r10932 r10934 824 824 825 825 826 nameservers_cache = {} 827 def get_nameservers(): 828 if nameservers_cache: 829 return nameservers_cache 830 831 for host in get_proxylist() + get_hybridlist(): 832 hostdump = get_yaml(host) 833 nameservers_cache[hostdump['masterip']] = hostdump['autogen_realname'] 834 835 return nameservers_cache 836 837 826 838 def generate_resolv_conf(datadump): 827 839 """ Generate configuration file '/etc/resolv.conf' """ … … 829 841 datadump['autogen_header'] = generate_header(datadump, "#") 830 842 datadump['autogen_edge_nameservers'] = '' 831 for host in get_proxylist(): 832 hostdump = get_yaml(host) 833 datadump['autogen_edge_nameservers'] += "nameserver %(masterip)-15s # %(autogen_realname)s\n" % hostdump 834 for host in get_hybridlist(): 835 hostdump = get_yaml(host) 836 if hostdump['service_proxy_ileiden'] or hostdump['service_proxy_normal']: 837 datadump['autogen_edge_nameservers'] += "nameserver %(masterip)-15s # %(autogen_realname)s\n" % hostdump 843 844 845 for masterip,realname in get_nameservers().iteritems(): 846 datadump['autogen_edge_nameservers'] += "nameserver %-15s # %s\n" % (masterip, realname) 838 847 839 848 return Template("""\
Note:
See TracChangeset
for help on using the changeset viewer.