Last change
on this file since 3736 was 3320, checked in by Bruno Cornec, 10 years ago |
- Re-add (thanks git BTW) the 2.2.9 branch which had been destroyed in
the move to 3.0
|
File size:
765 bytes
|
Rev | Line | |
---|
[3320] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | domain=`(. /boot.conf; echo "$DNSDOMAINNAME") 2>/dev/null`
|
---|
| 4 |
|
---|
| 5 | echo "# This file is automagically regenerated with each boot"
|
---|
| 6 | echo
|
---|
| 7 | test "$domain" && echo "domain $domain"
|
---|
| 8 | test "$domain" && echo "search $domain"
|
---|
| 9 | echo
|
---|
| 10 | echo "# Note that nslookup can choke on DNS server which itself"
|
---|
| 11 | echo "# does NOT have domain name. Other things can work fine."
|
---|
| 12 | echo
|
---|
| 13 | # # If we run DNS cache:
|
---|
| 14 | # echo "nameserver 127.0.0.1"
|
---|
| 15 | # exit
|
---|
| 16 |
|
---|
| 17 | prio=0
|
---|
| 18 | i=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]}"
|
---|
| 22 | let i++; done
|
---|
| 23 |
|
---|
| 24 | i=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
|
---|
| 31 | let i++; done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.