annotate scripts/nameserver_autogen/dnsmasq_tld_conffile @ 177:70a066da663d draft

modified scripts/nameserver_autogen/dnsmasq_tld_conffile to avoid colors in ls outut :)
author pragmo <pragmo@pragmo.ano>
date Sun, 10 Oct 2010 08:59:44 +0000
parents 9e6718a2d6c6
children 750fe07d268e
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
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
18 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
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})
9e6718a2d6c6 scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
pragmo <pragmo@pragmo.ano>
parents: 91
diff changeset
22 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
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
82
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
34 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
35 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
36 echo $STR
82
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
37 done;
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
38 done;
db00fd40866c added ip6
Antonio Quartulli <ordex@ritirata.org>
parents:
diff changeset
39 done