mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-24 21:54:36 +02:00
add fix from ticket #2290
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8732 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
ddd659f540
commit
3dec05cfcb
@ -2,6 +2,7 @@
|
|||||||
# Copyright (C) 2007 OpenWrt.org
|
# Copyright (C) 2007 OpenWrt.org
|
||||||
|
|
||||||
START=60
|
START=60
|
||||||
|
DNS_SERVERS=""
|
||||||
|
|
||||||
dhcp_calc() {
|
dhcp_calc() {
|
||||||
local ip="$1"
|
local ip="$1"
|
||||||
@ -173,6 +174,11 @@ dhcp_add() {
|
|||||||
config_get ifname "$net" ifname
|
config_get ifname "$net" ifname
|
||||||
[ -n "$ifname" ] || return 0
|
[ -n "$ifname" ] || return 0
|
||||||
|
|
||||||
|
config_get dnsserver "$net" dns
|
||||||
|
[ -n "$dnsserver" ] && {
|
||||||
|
DNS_SERVERS="$DNS_SERVERS $dnsserver"
|
||||||
|
}
|
||||||
|
|
||||||
append_bool "$cfg" ignore "-I $ifname"
|
append_bool "$cfg" ignore "-I $ifname"
|
||||||
|
|
||||||
config_get proto "$net" proto
|
config_get proto "$net" proto
|
||||||
@ -234,10 +240,10 @@ start() {
|
|||||||
|
|
||||||
/usr/sbin/dnsmasq $args && {
|
/usr/sbin/dnsmasq $args && {
|
||||||
rm -f /tmp/resolv.conf
|
rm -f /tmp/resolv.conf
|
||||||
cat > /tmp/resolv.conf <<EOF
|
DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
|
||||||
nameserver 127.0.0.1
|
for DNS_SERVER in $DNS_SERVERS ; do
|
||||||
search lan
|
echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
|
||||||
EOF
|
done
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user