diff --git a/src/hostinfo/named.py b/src/hostinfo/named.py index 7f53354ca27aef438d27c520612196fd282ebf1e..06dc667e9e093c5ec5184ac558a3f0a987fc732d 100755 --- a/src/hostinfo/named.py +++ b/src/hostinfo/named.py @@ -123,7 +123,7 @@ def header(tree, domain, origin=None): minimum=soa.minimum[0])) for ns in tree._host_._interface_._nameserver_: if ns.domain[0] == domain and ns.primary[0] == 'yes': - result += " IN NS %s" % ( + result += "@ IN NS %s" % ( util.fqn(tree, ns._parent)) pass pass @@ -133,7 +133,7 @@ def header(tree, domain, origin=None): continue subdomain = ns.domain[0].split('.') if subdomain[1:] == domain.split('.'): - delegation.append( '%-16sIN NS %s' % + delegation.append( '%-16sIN NS %s' % (subdomain[0], util.fqn(tree, ns._parent))) for d in sorted(delegation): @@ -199,11 +199,11 @@ def generate_forward(tree, hosts): if m.domain[0] == domain]: pri = int(mx.priority[0] or 0) ttl = mx.ttl[0] or '' - result += (' %-8s IN MX %d %s' % + result += ('@ %-8s IN MX %d %s' % (ttl, pri, util.fqn(tree, mx._parent))) pass for txt in [ t for t in tree._subnet_._txt_ if t.domain[1] == domain]: - result += (' IN TXT "%s"' % (txt.value[0])) + result += ('@ IN TXT "%s"' % (txt.value[0])) pass for srv in [ s for s in tree._subnet_._srv_ if s.domain[1] == domain]: s = {}