summaryrefslogtreecommitdiffstats
path: root/update-root-hints.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:28:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-26 10:28:58 +0000
commitc4c0b7dc2086e06ec53985ebf4de295e21529712 (patch)
tree81f869492163b52080115b64d92c91dd2d2ce7f2 /update-root-hints.sh
parentAdding debian version 2024041801. (diff)
downloaddns-root-data-c4c0b7dc2086e06ec53985ebf4de295e21529712.tar.xz
dns-root-data-c4c0b7dc2086e06ec53985ebf4de295e21529712.zip
Merging upstream version 2024041802.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'update-root-hints.sh')
-rwxr-xr-xupdate-root-hints.sh21
1 files changed, 21 insertions, 0 deletions
diff --git a/update-root-hints.sh b/update-root-hints.sh
new file mode 100755
index 0000000..14319b3
--- /dev/null
+++ b/update-root-hints.sh
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+# This data is documented at <https://www.iana.org/domains/root/files>.
+
+wget -O root.hints.NEW https://www.internic.net/domain/named.root
+
+# ignore the update date, which changes daily
+if diff -u --ignore-matching-lines='^;[[:space:]]*\(last update\|related version of root zone\):' root.hints root.hints.NEW; then
+ echo "root.hints has NOT changed."
+ rm root.hints.NEW
+ exit
+fi
+
+echo "root.hints has changed."
+
+wget -O root.hints.sig.NEW https://www.internic.net/domain/named.root.sig
+
+gpgv --keyring $(pwd)/registry-admin.key root.hints.sig.NEW root.hints.NEW
+
+mv root.hints.NEW root.hints
+mv root.hints.sig.NEW root.hints.sig
+