blob: 48c2176af6eaa0a3f7b8ae96b529aceabe8ade7f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#!/bin/sh
if ! ./scripts/check_db_safety; then
exit 1
fi
tldsrvrname="$(./scripts/conf_var tinydns__tldsrvrname b30a3fc880c970d4b4f945dd82af4de2.ns.pragmo.ano)"
tldsrvrip="$(./scripts/conf_var tinydns__tldsrvrip 1.0.16.100)"
for tld in db/ip/?? ; do
if [ "x$(basename $tld)" != 'x??' ]; then
first="$(basename $tld | ./scripts/hex2dec)"
tldname="$first.in-addr.arpa"
echo "+$tldsrvrname:$tldsrvrip:3600"
echo ".$tldname::$tldsrvrname"
for ip in $tld/??/?? ; do
if [ "x$(basename $ip)" != 'x??' ]; then
third="$(basename $ip | ./scripts/hex2dec)"
second="$(basename $(dirname $ip) | ./scripts/hex2dec)"
first="$(basename $(dirname $(dirname $ip)) | ./scripts/hex2dec)"
domain="$third.$second.$first.in-addr.arpa"
for ns in $ip/ns/* ; do
nsname="$(basename $ns)"
if [ "x$nsname" != 'x*' ]; then
nsip="$(cat $ns)"
echo "&$domain:$nsip:$nsname"
fi
done
fi
done
fi
done
for tld in db/dom/* ; do
tldname="$(basename $tld)"
echo "+$tldsrvrname:$tldsrvrip:3600"
echo ".$tldname::$tldsrvrname"
for zone in $tld/* ; do
for ns in $zone/ns/* ; do
domain="$(basename $zone).$(basename $tld)"
nsip="$(cat $ns)"
nsname="$(basename $ns)"
echo "&$domain:$nsip:$nsname"
done
done
done
|