3 zmienionych plików z 13 dodań i 29 usunięć
@ -1,32 +1,20 @@
|
||||
#!/bin/sh |
||||
|
||||
SERVER=a.root-servers.net |
||||
TMPFILE=/tmp/tmp.$$ |
||||
ROOTFILE=./db.root |
||||
|
||||
date=`date` |
||||
date=`date '+%Y-%m-%d'` |
||||
cat >$ROOTFILE <<EOT |
||||
; |
||||
; db.root -- BIND "hint" file |
||||
; [automatically created on $date by db.root.sh] |
||||
; |
||||
; Notice: Although this file officially is only used to initially load |
||||
; the cache of the BIND nameserver, it is actually used to specify the |
||||
; root nameservers only. |
||||
; |
||||
;; |
||||
;; db.root -- Internet Root Nameservers |
||||
;; DO NOT EDIT, IT WAS AUTOMATICALLY CREATED ON $date BY db.root.sh! |
||||
;; |
||||
|
||||
EOT |
||||
nslookup >$TMPFILE <<-EOF |
||||
server $SERVER |
||||
set type=NS |
||||
. |
||||
EOF |
||||
cat $TMPFILE |\ |
||||
dig @A.ROOT-SERVERS.NET . NS |\ |
||||
awk ' |
||||
/nameserver =/ { printf("%-20s 99999999 IN NS %s.\n", ".", $NF); } |
||||
/address =/ { printf("%-20s 99999999 IN A %s\n", $1 ".", $NF); } |
||||
/IN NS/ { printf("%-20s 99999999 IN NS %s\n", $1, $NF); } |
||||
/IN A/ { printf("%-20s 99999999 IN A %s\n", $1, $NF); } |
||||
' |\ |
||||
sort >>$ROOTFILE |
||||
rm $TMPFILE |
||||
echo "" >>$ROOTFILE |
||||
|
||||
|
Ładowanie…
Reference in new issue