comparison scripts/export/dn42_registry @ 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 18e5ecaa4395
children 4ace60b88ec0
comparison
equal deleted inserted replaced
65:28523fb57610 66:70a0167e1b20
16 echo -e "status:\t\tconnect" 16 echo -e "status:\t\tconnect"
17 echo -e "admin-c:\t$owner" 17 echo -e "admin-c:\t$owner"
18 echo -e "tech-c:\t\t$owner" 18 echo -e "tech-c:\t\t$owner"
19 ) > "export/dn42/data/dns/$domain" 19 ) > "export/dn42/data/dns/$domain"
20 done 20 done
21 mkdir -p export/dn42/data/inetnum || exit 1
22 for i3 in db/ip/AC/16/?? ; do
23 third="$(basename $i3 | ./scripts/hex2dec)"
24 second="$(basename $(dirname $i3) | ./scripts/hex2dec)"
25 first="$(basename $(dirname $(dirname $i3)) | ./scripts/hex2dec)"
26 ip="$first.$second.$third"
27 ownershort="`cat $i3/owner | tr a-z A-Z`"
28 owner="$ownershort-DN42"
29 (
30 echo -e "inetnum:\t$ip.0 - $ip.255"
31 for ns in $i3/ns/* ; do
32 nsname="`basename $ns`"
33 nsip="`cat $ns`"
34 echo -e "nserver:\t$nsname $nsip"
35 done
36 echo -e "netname:\t$ownershort's dn42 network"
37 echo -e "country:\tunknown to resdb"
38 echo -e "admin-c:\t$owner"
39 echo -e "tech-c:\t\t$owner"
40 echo -e "status:\t\tASSIGNED"
41 ) > "export/dn42/data/inetnum/$ip.0_24"
42 done