Mercurial > hg > anonet-resdb
comparison scripts/nameserver_autogen/tinydns_tld_datafile @ 79:9a0e9ee425cc draft
bug fixes for tinydns datafile generation (thanks again, Quintum)
author | Nick <nick@somerandomnick.ano> |
---|---|
date | Thu, 22 Jul 2010 01:33:31 +0000 |
parents | 059b5f3d7808 |
children | fa0053d4cb53 |
comparison
equal
deleted
inserted
replaced
78:f37d8fca5548 | 79:9a0e9ee425cc |
---|---|
2 if ! ./scripts/check_db_safety; then | 2 if ! ./scripts/check_db_safety; then |
3 exit 1 | 3 exit 1 |
4 fi | 4 fi |
5 tldsrvrname="$(./scripts/conf_var tinydns__tldsrvrname uz5fvb7zdqyuz4q8ysjdfuf04kzd2lrt0l6fp4uyguxdg5tfut06ck.anons.somerandomnick.ano)" | 5 tldsrvrname="$(./scripts/conf_var tinydns__tldsrvrname uz5fvb7zdqyuz4q8ysjdfuf04kzd2lrt0l6fp4uyguxdg5tfut06ck.anons.somerandomnick.ano)" |
6 tldsrvrip="$(./scripts/conf_var tinydns__tldsrvrip 1.0.27.37)" | 6 tldsrvrip="$(./scripts/conf_var tinydns__tldsrvrip 1.0.27.37)" |
7 for tld in db/ip/* ; do | 7 for tld in db/ip/?? ; do |
8 first="$(basename $tld | ./scripts/hex2dec)" | 8 if [ "x$(basename $tld)" != 'x??' ]; then |
9 tldname="$first.in-addr.arpa" | 9 first="$(basename $tld | ./scripts/hex2dec)" |
10 echo "+$tldsrvrname:$tldsrvrip:3600" | 10 tldname="$first.in-addr.arpa" |
11 echo ".$tldname::$tldsrvrname" | 11 echo "+$tldsrvrname:$tldsrvrip:3600" |
12 for ip in $tld/*/* ; do | 12 echo ".$tldname::$tldsrvrname" |
13 third="$(basename $ip | ./scripts/hex2dec)" | 13 for ip in $tld/??/?? ; do |
14 second="$(basename $(dirname $ip) | ./scripts/hex2dec)" | 14 if [ "x$(basename $ip)" != 'x??' ]; then |
15 first="$(basename $(dirname $(dirname $ip)) | ./scripts/hex2dec)" | 15 third="$(basename $ip | ./scripts/hex2dec)" |
16 domain="$third.$second.$first.in-addr.arpa" | 16 second="$(basename $(dirname $ip) | ./scripts/hex2dec)" |
17 for ns in $ip/ns/* ; do | 17 first="$(basename $(dirname $(dirname $ip)) | ./scripts/hex2dec)" |
18 nsip="$(cat $ns)" | 18 domain="$third.$second.$first.in-addr.arpa" |
19 nsname="$(basename $ns)" | 19 for ns in $ip/ns/* ; do |
20 echo "&$domain:$nsip:$nsname" | 20 nsname="$(basename $ns)" |
21 if [ "x$nsname" != 'x*' ]; then | |
22 nsip="$(cat $ns)" | |
23 echo "&$domain:$nsip:$nsname" | |
24 fi | |
25 done | |
26 fi | |
21 done | 27 done |
22 done | 28 fi |
23 done | 29 done |
24 for tld in db/dom/* ; do | 30 for tld in db/dom/* ; do |
25 tldname="$(basename $tld)" | 31 tldname="$(basename $tld)" |
26 echo "+$tldsrvrname:$tldsrvrip:3600" | 32 echo "+$tldsrvrname:$tldsrvrip:3600" |
27 echo ".$tldname::$tldsrvrname" | 33 echo ".$tldname::$tldsrvrname" |