File: update-root-hints.sh

package info (click to toggle)
dns-root-data 2025080400
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 108 kB
  • sloc: perl: 104; sh: 27; xml: 26; makefile: 9
file content (21 lines) | stat: -rwxr-xr-x 647 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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