Mercurial > hg > anonet-resdb
annotate scripts/nameserver_autogen/dnsmasq_tld_conffile @ 458:a7f1dac4cb22 draft
FTFY
author | thejetset <nobody@nowhere> |
---|---|
date | Tue, 29 Mar 2011 01:58:47 +0000 |
parents | 750fe07d268e |
children | bc0c2cfc9921 |
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 |
238 | 34 for ns in $($LS db/dom/${tld}/${domain}/ns/); do |
35 STR="server=/${domain}.${tld}/$(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
|
36 echo $STR |
82 | 37 done; |
38 done; | |
39 done |