Mercurial > hg > anonet-resdb
changeset 66:70a0167e1b20 draft
updated dn42 export to export netblock info
author | Nick <nick@somerandomnick.ano> |
---|---|
date | Mon, 21 Jun 2010 19:01:09 +0000 |
parents | 28523fb57610 |
children | e8e0adb25a6d |
files | scripts/export/dn42_registry |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/export/dn42_registry Fri Jun 18 05:39:45 2010 +0000 +++ b/scripts/export/dn42_registry Mon Jun 21 19:01:09 2010 +0000 @@ -18,3 +18,25 @@ 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