comparison scripts/nameserver_autogen/dnsmasq_tld_conffile @ 92:9e6718a2d6c6 draft

scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
author pragmo <pragmo@pragmo.ano>
date Thu, 05 Aug 2010 03:11:16 +0200
parents 17e4bef39c08
children 70a066da663d
comparison
equal deleted inserted replaced
91:17e4bef39c08 92:9e6718a2d6c6
1 #!/bin/bash 1 #!/bin/bash
2 #Remember to redirect the output into some file! 2 #
3 # Call this script directly from the git root and redirect
4 # its output to a file.
5 # This file should then be imported in the dnsmasq.conf
6 # using the conf-file=path-to-this-file statement.
7 #
3 8
4 sh scripts/check_db_safety || exit 1 9 sh scripts/check_db_safety || exit 1
10
11 for a in $(ls db/ip/); do
12 for b in $(ls db/ip/${a}); do
13 for c in $(ls db/ip/${a}/${b}); do
14 if [ -d db/ip/${a}/${b}/${c}/ns/ ]; then
15 for ns in $(cat db/ip/${a}/${b}/${c}/ns/*); do
16 A1=$(scripts/hex2dec ${a})
17 B1=$(scripts/hex2dec ${b})
18 C1=$(scripts/hex2dec ${c})
19 STR="server=/${C1}.${B1}.${A1}.in-addr.arpa/${ns}"
20 echo $STR
21 done
22 fi
23 done
24 done
25 done
26
27 echo
5 28
6 for tld in $(ls db/dom/); do 29 for tld in $(ls db/dom/); do
7 for domain in $(ls db/dom/${tld}/); do 30 for domain in $(ls db/dom/${tld}/); do
8 for ns in $(cat db/dom/${tld}/${domain}/ns/*); do 31 for ns in $(cat db/dom/${tld}/${domain}/ns/*); do
9 STR="server=/${domain}.${tld}/${ns}" 32 STR="server=/${domain}.${tld}/${ns}"
10 if [ "$(grep $STR /etc/dnsmasq.conf)" = "" ]; then 33 echo $STR
11 echo $STR
12 fi
13 done; 34 done;
14 done; 35 done;
15 done 36 done