annotate scripts/nameserver_autogen/tinydns_tld_datafile @ 1094:1d2f501fa55e draft

epoch added as 4141 and CIDR 1.41.41.0/24
author epoch <epoch@hacking.allowed.org>
date Sun, 24 Mar 2013 12:51:10 +0000
parents dab670ad6e31
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
1 #!/bin/sh
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
2 if ! ./scripts/check_db_safety; then
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
3 exit 1
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
4 fi
125
18ac7e165dde Revert "Added atomictorrent repo, and added multirepo support for pragmo:"
Nick <nick@somerandomnick.ano>
parents: 122
diff changeset
5 tldsrvrname="$(./scripts/conf_var tinydns__tldsrvrname uz5fvb7zdqyuz4q8ysjdfuf04kzd2lrt0l6fp4uyguxdg5tfut06ck.anons.somerandomnick.ano)"
18ac7e165dde Revert "Added atomictorrent repo, and added multirepo support for pragmo:"
Nick <nick@somerandomnick.ano>
parents: 122
diff changeset
6 tldsrvrip="$(./scripts/conf_var tinydns__tldsrvrip 1.0.27.37)"
620
d9b51927d97e bugfix (thx d3v11)
Nick <nick@somerandomnick.ano>
parents: 125
diff changeset
7 echo "+$tldsrvrname:$tldsrvrip:3600"
79
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
8 for tld in db/ip/?? ; do
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
9 if [ "x$(basename $tld)" != 'x??' ]; then
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
10 first="$(basename $tld | ./scripts/hex2dec)"
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
11 tldname="$first.in-addr.arpa"
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
12 echo ".$tldname::$tldsrvrname"
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
13 for ip in $tld/??/?? ; do
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
14 if [ "x$(basename $ip)" != 'x??' ]; then
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
15 third="$(basename $ip | ./scripts/hex2dec)"
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
16 second="$(basename $(dirname $ip) | ./scripts/hex2dec)"
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
17 first="$(basename $(dirname $(dirname $ip)) | ./scripts/hex2dec)"
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
18 domain="$third.$second.$first.in-addr.arpa"
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
19 for ns in $ip/ns/* ; do
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
20 nsname="$(basename $ns)"
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
21 if [ "x$nsname" != 'x*' ]; then
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
22 nsip="$(cat $ns)"
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
23 echo "&$domain:$nsip:$nsname"
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
24 fi
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
25 done
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
26 fi
13
059b5f3d7808 added rDNS to tinydns datafile generation
Nick <nick@somerandomnick.ano>
parents: 12
diff changeset
27 done
79
9a0e9ee425cc bug fixes for tinydns datafile generation (thanks again, Quintum)
Nick <nick@somerandomnick.ano>
parents: 13
diff changeset
28 fi
13
059b5f3d7808 added rDNS to tinydns datafile generation
Nick <nick@somerandomnick.ano>
parents: 12
diff changeset
29 done
12
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
30 for tld in db/dom/* ; do
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
31 tldname="$(basename $tld)"
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
32 echo ".$tldname::$tldsrvrname"
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
33 for zone in $tld/* ; do
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
34 for ns in $zone/ns/* ; do
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
35 domain="$(basename $zone).$(basename $tld)"
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
36 nsip="$(cat $ns)"
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
37 nsname="$(basename $ns)"
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
38 echo "&$domain:$nsip:$nsname"
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
39 done
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
40 done
41b330b11a33 coded a tinydns datafile generator
Nick <nick@somerandomnick.ano>
parents:
diff changeset
41 done