diff options
author | pragmo <pragmo@pragmo.ano> | 2010-08-05 03:11:16 +0200 |
---|---|---|
committer | pragmo <pragmo@pragmo.ano> | 2010-08-05 03:11:16 +0200 |
commit | 2da057a8502cc67ba3dc501713a6b4aef7a4dbc2 (patch) | |
tree | 4cd89b94857c085dfd10bdbd93fe0b6fe90fa46c /scripts | |
parent | bb9dc0c1f42ec6d42fc283c880652302b2d5b13d (diff) | |
download | resdb-2da057a8502cc67ba3dc501713a6b4aef7a4dbc2.tar.gz resdb-2da057a8502cc67ba3dc501713a6b4aef7a4dbc2.zip |
scripts/nameserver_autogen/dnsmasq_tld_conffile now write also revDNS nameservers
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/nameserver_autogen/dnsmasq_tld_conffile | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/scripts/nameserver_autogen/dnsmasq_tld_conffile b/scripts/nameserver_autogen/dnsmasq_tld_conffile index e7d3fb6..5ba2853 100755 --- a/scripts/nameserver_autogen/dnsmasq_tld_conffile +++ b/scripts/nameserver_autogen/dnsmasq_tld_conffile @@ -1,15 +1,36 @@ #!/bin/bash -#Remember to redirect the output into some file! +# +# Call this script directly from the git root and redirect +# its output to a file. +# This file should then be imported in the dnsmasq.conf +# using the conf-file=path-to-this-file statement. +# sh scripts/check_db_safety || exit 1 +for a in $(ls db/ip/); do + for b in $(ls db/ip/${a}); do + for c in $(ls db/ip/${a}/${b}); do + if [ -d db/ip/${a}/${b}/${c}/ns/ ]; then + for ns in $(cat db/ip/${a}/${b}/${c}/ns/*); do + A1=$(scripts/hex2dec ${a}) + B1=$(scripts/hex2dec ${b}) + C1=$(scripts/hex2dec ${c}) + STR="server=/${C1}.${B1}.${A1}.in-addr.arpa/${ns}" + echo $STR + done + fi + done + done +done + +echo + for tld in $(ls db/dom/); do for domain in $(ls db/dom/${tld}/); do for ns in $(cat db/dom/${tld}/${domain}/ns/*); do STR="server=/${domain}.${tld}/${ns}" - if [ "$(grep $STR /etc/dnsmasq.conf)" = "" ]; then - echo $STR - fi + echo $STR done; done; done |