summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/nameserver_autogen/bind_tld_zonefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/nameserver_autogen/bind_tld_zonefile b/scripts/nameserver_autogen/bind_tld_zonefile
index 3850d92..344bb4e 100755
--- a/scripts/nameserver_autogen/bind_tld_zonefile
+++ b/scripts/nameserver_autogen/bind_tld_zonefile
@@ -8,12 +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);
- if (substr($server, -4, 4) == ".ano") $server .= ".";
foreach ($ips as $ip) {
- print($server.' IN A '.$ip."\n");
+ print($fqserver.' IN A '.$ip."\n");
}
}
}