Mercurial > hg > anonet-resdb
changeset 364:4fbc2e8407b0 draft
Merge branch 'master' of git://1.0.27.102
author | lex <lex@lynx.ano> |
---|---|
date | Wed, 12 Jan 2011 06:13:51 -0600 |
parents | 59102e1e06f9 (diff) 30b747e3c5d6 (current diff) |
children | c35fdaa5fc48 6e2661e2a726 |
files | |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/nameserver_autogen/bind_tld_zonefile Wed Jan 12 07:43:33 2011 +0000 +++ b/scripts/nameserver_autogen/bind_tld_zonefile Wed Jan 12 06:13:51 2011 -0600 @@ -8,11 +8,14 @@ $servers = scandir($name.'/ns/'); foreach ($servers as $server) { if ($server[0] == '.') continue; - print($name.' IN NS '.$server."\n"); + if (substr($name, -4) == ".ano") $name .= "."; + $fqserver = $server; + if (substr($server, -4) == ".ano") $fqserver .= "."; + print($name.' IN NS '.$fqserver."\n"); $ips = file($name.'/ns/'.$server, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); foreach ($ips as $ip) { - print($server.' IN A '.$ip."\n"); + print($fqserver.' IN A '.$ip."\n"); } } }