#!/bin/bash## 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 ||exit1LS="ls --color=never"for a in $($LS db/ip/);dofor b in $($LS db/ip/${a});dofor c in $($LS db/ip/${a}/${b});doif[ -d db/ip/${a}/${b}/${c}/ns/ ];thenfor ns in $($LS db/ip/${a}/${b}/${c}/ns/);doA1=$(scripts/hex2dec ${a})B1=$(scripts/hex2dec ${b})C1=$(scripts/hex2dec ${c})STR="server=/${C1}.${B1}.${A1}.in-addr.arpa/$(scripts/ns2ip -f ${ns})"echo$STRdonefidonedonedoneechofor tld in $($LS db/dom/);dofor domain in $($LS db/dom/${tld}/);dofor ns in $($LS db/dom/${tld}/${domain}/ns/);doSTR="server=/${domain}.${tld}/$(scripts/ns2ip -f ${ns})"echo$STRdone;done;done