• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/busybox/examples/var_service/fw/etc/
1#!/bin/bash
2
3domain=`(. /boot.conf; echo "$DNSDOMAINNAME") 2>/dev/null`
4
5echo "# This file is automagically regenerated with each boot"
6echo
7test "$domain" && echo "domain $domain"
8test "$domain" && echo "search $domain"
9echo
10echo "# Note that nslookup can choke on DNS server which itself"
11echo "# does NOT have domain name. Other things can work fine."
12echo
13# # If we run DNS cache:
14# echo "nameserver 127.0.0.1"
15# exit
16
17prio=0
18i=0; while test "${if[$i]}"; do
19	test x"${dns_prio[$i]}" != x"" \
20	&& test "${dns_prio[$i]}" -gt "$prio" \
21	&& prio="${dns_prio[$i]}"
22let i++; done
23
24i=0; while test "${if[$i]}"; do
25	for d in ${dns[$i]}; do
26		p="${dns_prio[$i]}"
27		test x"$p" == x"" && p=0
28		test x"$p" == x"$prio" || continue
29		echo "nameserver $d"
30	done
31let i++; done
32