changeset 342:0aecff46b1ac draft

Merge branch 'master' of git://1.3.9.1
author pragmo <pragmo@pragmo.ano>
date Mon, 10 Jan 2011 23:49:36 +0000
parents 2970515a2615 (current diff) 4a4f9682f43e (diff)
children cff5cab73f87
files
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/nameserver_autogen/bind_tld_zonefile	Mon Jan 10 05:46:02 2011 +0000
+++ b/scripts/nameserver_autogen/bind_tld_zonefile	Mon Jan 10 23:49:36 2011 +0000
@@ -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");
   }
  }
 }