annotate scripts/nameserver_autogen/dnsmasq_tld_conffile @ 99:d5a0da431616 draft

added darknet comparison page into POD makefile
author Nick <nick@somerandomnick.ano>
date Sun, 08 Aug 2010 08:28:55 +0000
parents 9e6718a2d6c6
children 70a066da663d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
82
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
1 #!/bin/bash
92
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
2 #
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
3 # Call this script directly from the git root and redirect
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
4 # its output to a file.
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
5 # This file should then be imported in the dnsmasq.conf
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
6 # using the conf-file=path-to-this-file statement.
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
7 #
82
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
8
91
17e4bef39c08 Modification of scripts/nameserver_autogen/dnsmasq_tld_conffile
pragmo <pragmo@pragmo.ano>
parents: 85
diff changeset
9 sh scripts/check_db_safety || exit 1
17e4bef39c08 Modification of scripts/nameserver_autogen/dnsmasq_tld_conffile
pragmo <pragmo@pragmo.ano>
parents: 85
diff changeset
10
92
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
11 for a in $(ls db/ip/); do
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
12 for b in $(ls db/ip/${a}); do
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
13 for c in $(ls db/ip/${a}/${b}); do
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
14 if [ -d db/ip/${a}/${b}/${c}/ns/ ]; then
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
15 for ns in $(cat db/ip/${a}/${b}/${c}/ns/*); do
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
16 A1=$(scripts/hex2dec ${a})
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
17 B1=$(scripts/hex2dec ${b})
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
18 C1=$(scripts/hex2dec ${c})
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
19 STR="server=/${C1}.${B1}.${A1}.in-addr.arpa/${ns}"
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
20 echo $STR
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
21 done
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
22 fi
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
23 done
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
24 done
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
25 done
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
26
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
27 echo
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
28
82
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
29 for tld in $(ls db/dom/); do
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
30 for domain in $(ls db/dom/${tld}/); do
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
31 for ns in $(cat db/dom/${tld}/${domain}/ns/*); do
85
f091fb99fcf9 scripts/nameserver_autogen/dnsmasq_tld_conffile modified
Antonio Quartulli <ordex@ritirata.org>
parents: 82
diff changeset
32 STR="server=/${domain}.${tld}/${ns}"
92
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
33 echo $STR
82
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
34 done;
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
35 done;
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
36 done