diff options
author | vutral <vutral@vutral.ano> | 2011-02-03 08:58:44 +0100 |
---|---|---|
committer | vutral <vutral@vutral.ano> | 2011-02-03 08:58:44 +0100 |
commit | 503c1603d591817d8d02d66f5dfdf5132bb42fd3 (patch) | |
tree | dbb0eb3889f845f5f02b4f418dc6a1bc213990b7 /scripts/nameserver_autogen/bind_tld_zonefile | |
parent | e540c8edbfccbfa3201f1387c0864de94f4384ff (diff) | |
parent | 3266eb68b87721a5dca7b54cabc1e866b48828a8 (diff) | |
download | resdb-503c1603d591817d8d02d66f5dfdf5132bb42fd3.tar.gz resdb-503c1603d591817d8d02d66f5dfdf5132bb42fd3.zip |
Merge branch 'master' of git://1.0.27.102
Diffstat (limited to 'scripts/nameserver_autogen/bind_tld_zonefile')
-rwxr-xr-x | scripts/nameserver_autogen/bind_tld_zonefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/nameserver_autogen/bind_tld_zonefile b/scripts/nameserver_autogen/bind_tld_zonefile index 4755cfd..344bb4e 100755 --- a/scripts/nameserver_autogen/bind_tld_zonefile +++ b/scripts/nameserver_autogen/bind_tld_zonefile @@ -8,11 +8,14 @@ foreach ($names as $name) { $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"); } } } |