summaryrefslogtreecommitdiff
path: root/scripts/nameserver_autogen
diff options
context:
space:
mode:
authorNick <nick@somerandomnick.ano>2010-04-19 07:37:46 +0000
committerNick <nick@somerandomnick.ano>2010-04-19 07:37:46 +0000
commitd36677106b32bae92fa7286a917d1b0f7abee5fd (patch)
tree3a51f16339b39830c1185c297c742f0ef873c5cf /scripts/nameserver_autogen
parentb559df204f4d99b9be8cb86686f844f33c687b19 (diff)
downloadresdb-d36677106b32bae92fa7286a917d1b0f7abee5fd.tar.gz
resdb-d36677106b32bae92fa7286a917d1b0f7abee5fd.zip
added rDNS to tinydns datafile generation
Diffstat (limited to 'scripts/nameserver_autogen')
-rwxr-xr-xscripts/nameserver_autogen/tinydns_tld_datafile17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/nameserver_autogen/tinydns_tld_datafile b/scripts/nameserver_autogen/tinydns_tld_datafile
index ff84576..0a1174f 100755
--- a/scripts/nameserver_autogen/tinydns_tld_datafile
+++ b/scripts/nameserver_autogen/tinydns_tld_datafile
@@ -4,6 +4,23 @@ if ! ./scripts/check_db_safety; then
fi
tldsrvrname="$(./scripts/conf_var tinydns__tldsrvrname uz5fvb7zdqyuz4q8ysjdfuf04kzd2lrt0l6fp4uyguxdg5tfut06ck.anons.somerandomnick.ano)"
tldsrvrip="$(./scripts/conf_var tinydns__tldsrvrip 1.0.27.37)"
+for tld in db/ip/* ; do
+ first="$(basename $tld | ./scripts/hex2dec)"
+ tldname="$first.in-addr.arpa"
+ echo "+$tldsrvrname:$tldsrvrip:3600"
+ echo ".$tldname::$tldsrvrname"
+ for ip in $tld/*/* ; do
+ third="$(basename $ip | ./scripts/hex2dec)"
+ second="$(basename $(dirname $ip) | ./scripts/hex2dec)"
+ first="$(basename $(dirname $(dirname $ip)) | ./scripts/hex2dec)"
+ domain="$third.$second.$first.in-addr.arpa"
+ for ns in $ip/ns/* ; do
+ nsip="$(cat $ns)"
+ nsname="$(basename $ns)"
+ echo "&$domain:$nsip:$nsname"
+ done
+ done
+done
for tld in db/dom/* ; do
tldname="$(basename $tld)"
echo "+$tldsrvrname:$tldsrvrip:3600"