annotate scripts/nameserver_autogen/dnsmasq_tld_conffile @ 940:3a2b5cd0ad4d draft

added wk.ano domain
author wakawaka <nobody@nowhere>
date Thu, 15 Mar 2012 20:31:14 +0000
parents 04a5f1cdced7
children
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
177
70a066da663d modified scripts/nameserver_autogen/dnsmasq_tld_conffile to avoid colors in ls outut :)
pragmo <pragmo@pragmo.ano>
parents: 92
diff changeset
11
70a066da663d modified scripts/nameserver_autogen/dnsmasq_tld_conffile to avoid colors in ls outut :)
pragmo <pragmo@pragmo.ano>
parents: 92
diff changeset
12 LS="ls --color=never"
70a066da663d modified scripts/nameserver_autogen/dnsmasq_tld_conffile to avoid colors in ls outut :)
pragmo <pragmo@pragmo.ano>
parents: 92
diff changeset
13
70a066da663d modified scripts/nameserver_autogen/dnsmasq_tld_conffile to avoid colors in ls outut :)
pragmo <pragmo@pragmo.ano>
parents: 92
diff changeset
14 for a in $($LS db/ip/); do
70a066da663d modified scripts/nameserver_autogen/dnsmasq_tld_conffile to avoid colors in ls outut :)
pragmo <pragmo@pragmo.ano>
parents: 92
diff changeset
15 for b in $($LS db/ip/${a}); do
70a066da663d modified scripts/nameserver_autogen/dnsmasq_tld_conffile to avoid colors in ls outut :)
pragmo <pragmo@pragmo.ano>
parents: 92
diff changeset
16 for c in $($LS db/ip/${a}/${b}); do
92
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
17 if [ -d db/ip/${a}/${b}/${c}/ns/ ]; then
238
750fe07d268e pragmo.ano NS updated
pragmo <pragmo@pragmo.ano>
parents: 177
diff changeset
18 for ns in $($LS db/ip/${a}/${b}/${c}/ns/); do
92
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
19 A1=$(scripts/hex2dec ${a})
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
20 B1=$(scripts/hex2dec ${b})
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
21 C1=$(scripts/hex2dec ${c})
238
750fe07d268e pragmo.ano NS updated
pragmo <pragmo@pragmo.ano>
parents: 177
diff changeset
22 STR="server=/${C1}.${B1}.${A1}.in-addr.arpa/$(scripts/ns2ip -f ${ns})"
92
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
23 echo $STR
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 fi
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
26 done
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
27 done
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
28 done
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
29
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
30 echo
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
31
177
70a066da663d modified scripts/nameserver_autogen/dnsmasq_tld_conffile to avoid colors in ls outut :)
pragmo <pragmo@pragmo.ano>
parents: 92
diff changeset
32 for tld in $($LS db/dom/); do
70a066da663d modified scripts/nameserver_autogen/dnsmasq_tld_conffile to avoid colors in ls outut :)
pragmo <pragmo@pragmo.ano>
parents: 92
diff changeset
33 for domain in $($LS db/dom/${tld}/); do
747
04a5f1cdced7 bugfix (thx Nomius)
Nick <nick@somerandomnick.ano>
parents: 746
diff changeset
34 if [ -d $($LS -d db/dom/${tld}/${domain}/) ]; then
04a5f1cdced7 bugfix (thx Nomius)
Nick <nick@somerandomnick.ano>
parents: 746
diff changeset
35 if [ -d $($LS -d db/dom/${tld}/${domain}/ns/) ]; then
04a5f1cdced7 bugfix (thx Nomius)
Nick <nick@somerandomnick.ano>
parents: 746
diff changeset
36 for ns in $($LS db/dom/${tld}/${domain}/ns/); do
04a5f1cdced7 bugfix (thx Nomius)
Nick <nick@somerandomnick.ano>
parents: 746
diff changeset
37 STR="server=/${domain}.${tld}/$(scripts/ns2ip -f ${ns})"
04a5f1cdced7 bugfix (thx Nomius)
Nick <nick@somerandomnick.ano>
parents: 746
diff changeset
38 echo $STR
04a5f1cdced7 bugfix (thx Nomius)
Nick <nick@somerandomnick.ano>
parents: 746
diff changeset
39 done;
04a5f1cdced7 bugfix (thx Nomius)
Nick <nick@somerandomnick.ano>
parents: 746
diff changeset
40 fi
604
bc0c2cfc9921 d3v1150m471c.ano has no ns directory, dnsmasq zonegen now handles it
Nick <nick@somerandomnick.ano>
parents: 238
diff changeset
41 fi
82
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
42 done;
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
43 done