diff options
author | Nick <nick@somerandomnick.ano> | 2010-06-21 19:01:09 +0000 |
---|---|---|
committer | Nick <nick@somerandomnick.ano> | 2010-06-21 19:01:09 +0000 |
commit | f25a48df9b02d736e7185e38a7f8bc4119343982 (patch) | |
tree | 517e24f7e75c05c7f16e8a1dae761a0cd825fc53 | |
parent | d89550690ce2857eaf5309d25cea13aa9b0a901b (diff) | |
download | resdb-f25a48df9b02d736e7185e38a7f8bc4119343982.tar.gz resdb-f25a48df9b02d736e7185e38a7f8bc4119343982.zip |
updated dn42 export to export netblock info
-rwxr-xr-x | scripts/export/dn42_registry | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/export/dn42_registry b/scripts/export/dn42_registry index 8805926..c554933 100755 --- a/scripts/export/dn42_registry +++ b/scripts/export/dn42_registry @@ -18,3 +18,25 @@ for d in db/dom/dn42/* ; do echo -e "tech-c:\t\t$owner" ) > "export/dn42/data/dns/$domain" done +mkdir -p export/dn42/data/inetnum || exit 1 +for i3 in db/ip/AC/16/?? ; do + third="$(basename $i3 | ./scripts/hex2dec)" + second="$(basename $(dirname $i3) | ./scripts/hex2dec)" + first="$(basename $(dirname $(dirname $i3)) | ./scripts/hex2dec)" + ip="$first.$second.$third" + ownershort="`cat $i3/owner | tr a-z A-Z`" + owner="$ownershort-DN42" + ( + echo -e "inetnum:\t$ip.0 - $ip.255" + for ns in $i3/ns/* ; do + nsname="`basename $ns`" + nsip="`cat $ns`" + echo -e "nserver:\t$nsname $nsip" + done + echo -e "netname:\t$ownershort's dn42 network" + echo -e "country:\tunknown to resdb" + echo -e "admin-c:\t$owner" + echo -e "tech-c:\t\t$owner" + echo -e "status:\t\tASSIGNED" + ) > "export/dn42/data/inetnum/$ip.0_24" +done |