Mercurial > hg > anonet-resdb
annotate scripts/nameserver_autogen/dnsmasq_tld_conffile @ 1087:5a97ddac469c draft
another one
author | SeekingFor <nobody@nowhere> |
---|---|
date | Thu, 21 Mar 2013 12:28:45 +0000 |
parents | 04a5f1cdced7 |
children |
rev | line source |
---|---|
82 | 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 | 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 | 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 | 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 | 34 if [ -d $($LS -d db/dom/${tld}/${domain}/) ]; then |
35 if [ -d $($LS -d db/dom/${tld}/${domain}/ns/) ]; then | |
36 for ns in $($LS db/dom/${tld}/${domain}/ns/); do | |
37 STR="server=/${domain}.${tld}/$(scripts/ns2ip -f ${ns})" | |
38 echo $STR | |
39 done; | |
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 | 42 done; |
43 done |