Debian Codegraph @

examples/var_service/fw/etc/dnsmasq_servers.conf

raw symbols SCIP
1 #!/bin/bash
2
3 empty=true
4
5 prio=0
6 i=0; while test "${if[$i]}"; do
7 test x"${dns_prio[$i]}" != x"" \
8 && test "${dns_prio[$i]}" -gt "$prio" \
9 && prio="${dns_prio[$i]}"
10 let i++; done
11
12 i=0; while test "${if[$i]}"; do
13 if test "${dnsmasq[$i]}"; then
14 for d in ${dnsmasq[$i]}; do
15 echo "$d"
16 empty=false
17 done
18 let i++;
19 continue
20 fi
21 # This iface has no dnsmasq-extended config.
22 # Use simple DNS names instead, if those exist.
23 for d in ${dns[$i]}; do
24 p="${dns_prio[$i]}"
25 test x"$p" == x"" && p=0
26 test x"$p" == x"$prio" || continue
27 echo "server=$d"
28 empty=false
29 done
30 let i++;
31 done
32
33 # Use Google DNS servers if nothing else is configured
34 $empty && echo "server=8.8.8.8"
35 $empty && echo "server=8.8.4.4"
36
37 # SIGHUP: make dnsmasq reload config
38 svc -h dnsmasq