Mercurial > hg > anonet-resdb
annotate scripts/export/dn42_registry @ 1035:43aa555032fd draft
Merge branch 'master' of git://git.d3v11.ano
author | icann <icann@icann.ano> |
---|---|
date | Sun, 14 Oct 2012 23:49:14 +0000 |
parents | 4ace60b88ec0 |
children |
rev | line source |
---|---|
53 | 1 #!/bin/sh |
2 if ! ./scripts/check_db_safety; then | |
3 exit 1 | |
4 fi | |
5 mkdir -p export/dn42/data/dns || exit 1 | |
6 for d in db/dom/dn42/* ; do | |
7 domain="`basename $d`.dn42" | |
8 owner="`cat $d/owner | tr a-z A-Z`-DN42" | |
9 ( | |
10 echo -e "domain:\t\t$domain" | |
11 for ns in $d/ns/* ; do | |
12 nsname="`basename $ns`" | |
13 nsip="`cat $ns`" | |
14 echo -e "nserver:\t$nsname $nsip" | |
15 done | |
16 echo -e "status:\t\tconnect" | |
17 echo -e "admin-c:\t$owner" | |
68 | 18 echo -e "tech-c:\t\tRESDB-DN42" |
53 | 19 ) > "export/dn42/data/dns/$domain" |
20 done | |
66
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
21 mkdir -p export/dn42/data/inetnum || exit 1 |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
22 for i3 in db/ip/AC/16/?? ; do |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
23 third="$(basename $i3 | ./scripts/hex2dec)" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
24 second="$(basename $(dirname $i3) | ./scripts/hex2dec)" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
25 first="$(basename $(dirname $(dirname $i3)) | ./scripts/hex2dec)" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
26 ip="$first.$second.$third" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
27 ownershort="`cat $i3/owner | tr a-z A-Z`" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
28 owner="$ownershort-DN42" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
29 ( |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
30 echo -e "inetnum:\t$ip.0 - $ip.255" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
31 for ns in $i3/ns/* ; do |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
32 nsname="`basename $ns`" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
33 nsip="`cat $ns`" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
34 echo -e "nserver:\t$nsname $nsip" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
35 done |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
36 echo -e "netname:\t$ownershort's dn42 network" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
37 echo -e "country:\tunknown to resdb" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
38 echo -e "admin-c:\t$owner" |
68 | 39 echo -e "tech-c:\t\tRESDB-DN42" |
66
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
40 echo -e "status:\t\tASSIGNED" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
41 ) > "export/dn42/data/inetnum/$ip.0_24" |
70a0167e1b20
updated dn42 export to export netblock info
Nick <nick@somerandomnick.ano>
parents:
53
diff
changeset
|
42 done |