Commit 241f28df authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Version 2012-05-07 11:27

M  src/hostinfo/named.py
parent dd85fcaa
......@@ -133,6 +133,23 @@ def forward(tree, domain):
pri = int(m.priority[0] or 0)
result += "%-16sIN MX %d %s\n" % ("", pri ,fqn(tree, m._parent))
result += ";\n"
# Add domain TXT entries
newline = False
for t in tree._subnet_._txt_:
if t.domain[1] == domain.domain[0]:
result += ' IN TXT "%s"\n' % (
t.value[0])
newline = True
pass
pass
if newline:
result += ";\n"
pass
# Add a localhost entry
result += "localhost IN A 127.0.0.1\n"
result += ";\n"
host = {}
def add_entry(name, kind, value):
......@@ -172,10 +189,6 @@ def forward(tree, domain):
add_entry(c.alias[0], 'CNAME', '%s' % c.name[0])
pass
# Add a localhost entry
result += "localhost IN A 127.0.0.1\n"
result += ";\n"
# Add hosts
for h1 in sorted(host):
for k,v in sorted(host[h1]):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment