summaryrefslogtreecommitdiff
path: root/0-dump-root-zone.sh
diff options
context:
space:
mode:
Diffstat (limited to '0-dump-root-zone.sh')
-rwxr-xr-x0-dump-root-zone.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/0-dump-root-zone.sh b/0-dump-root-zone.sh
index b3e8c17..8c93b7d 100755
--- a/0-dump-root-zone.sh
+++ b/0-dump-root-zone.sh
@@ -2,8 +2,11 @@
set -e
-0>root-zone.dns
-cat > root-zone.dns <<-EOF
+# Empties the contents of the root dns file
+0>work/db.root
+
+# Prints a header for the root dns file
+cat > work/db.root <<-EOF
\$TTL 2d ; Default TTL for zone
\$ORIGIN .
@@ -16,4 +19,8 @@ cat > root-zone.dns <<-EOF
)
EOF
-dig -t axfr . @iad.xfr.dns.icann.org | grep -E 'DS|NS|A|AAAA' |sed '/RRSIG/d'|sed '/^\./d' >> root-zone.dns
+# Adds the root dns zone's content
+dig -t axfr . @iad.xfr.dns.icann.org \
+ |grep -E 'DS|NS|A|AAAA' \
+ |sed '/RRSIG/d' \
+ |sed '/^\./d' >> work/db.root