Browse Source

avoid ending up with an empty db.root

master
Thomas Lotterer 23 years ago committed by Ralf S. Engelschall
parent
commit
e95b2e10f3
  1. 2
      bind/bind.spec
  2. 12
      bind/db.root.sh

2
bind/bind.spec

@ -37,7 +37,7 @@ Distribution: OpenPKG [BASE]
Group: DNS Group: DNS
License: ISC License: ISC
Version: %{V_bind} Version: %{V_bind}
Release: 20030819 Release: 20030907
# package options # package options
%option with_dlz_mysql no %option with_dlz_mysql no

12
bind/db.root.sh

@ -10,11 +10,15 @@ cat >$ROOTFILE <<EOT
;; ;;
EOT EOT
dig @A.ROOT-SERVERS.NET . NS |\ for i in A B C D E F G H I J K L M; do
awk ' dig @$i.ROOT-SERVERS.NET . NS >$ROOTFILE.raw && break
/^[^;].*IN\tNS/ { printf("%-20s 99999999 IN NS %s\n", $1, $NF); } done
/^[^;].*IN\tA/ { printf("%-20s 99999999 IN A %s\n", $1, $NF); } [ -f $ROOTFILE.raw ] || exit 1
awk <$ROOTFILE.raw '
/IN NS/ { printf("%-20s 99999999 IN NS %s\n", $1, $NF); }
/IN A/ { printf("%-20s 99999999 IN A %s\n", $1, $NF); }
' |\ ' |\
sort >>$ROOTFILE sort >>$ROOTFILE
echo "" >>$ROOTFILE echo "" >>$ROOTFILE
rm $ROOTFILE.raw

Loading…
Cancel
Save