view scripts/nameserver_autogen/tinydns_tld_datafile @ 23:92c862314622 draft

added links and fixed href
author Nick <nick@somerandomnick.ano>
date Tue, 18 May 2010 03:44:41 +0000
parents 059b5f3d7808
children 9a0e9ee425cc
line wrap: on
line source

#!/bin/sh
if ! ./scripts/check_db_safety; then
 exit 1
fi
tldsrvrname="$(./scripts/conf_var tinydns__tldsrvrname uz5fvb7zdqyuz4q8ysjdfuf04kzd2lrt0l6fp4uyguxdg5tfut06ck.anons.somerandomnick.ano)"
tldsrvrip="$(./scripts/conf_var tinydns__tldsrvrip 1.0.27.37)"
for tld in db/ip/* ; do
 first="$(basename $tld | ./scripts/hex2dec)"
 tldname="$first.in-addr.arpa"
 echo "+$tldsrvrname:$tldsrvrip:3600"
 echo ".$tldname::$tldsrvrname"
 for ip in $tld/*/* ; do
  third="$(basename $ip | ./scripts/hex2dec)"
  second="$(basename $(dirname $ip) | ./scripts/hex2dec)"
  first="$(basename $(dirname $(dirname $ip)) | ./scripts/hex2dec)"
  domain="$third.$second.$first.in-addr.arpa"
  for ns in $ip/ns/* ; do
   nsip="$(cat $ns)"
   nsname="$(basename $ns)"
   echo "&$domain:$nsip:$nsname"
  done
 done
done
for tld in db/dom/* ; do
 tldname="$(basename $tld)"
 echo "+$tldsrvrname:$tldsrvrip:3600"
 echo ".$tldname::$tldsrvrname"
 for zone in $tld/* ; do
  for ns in $zone/ns/* ; do
   domain="$(basename $zone).$(basename $tld)"
   nsip="$(cat $ns)"
   nsname="$(basename $ns)"
   echo "&$domain:$nsip:$nsname"
  done
 done
done