summaryrefslogtreecommitdiff
path: root/package/dnsmasq/files
diff options
context:
space:
mode:
authorTravis Kemen <thepeople@openwrt.org>2007-09-10 20:24:18 +0000
committerTravis Kemen <thepeople@openwrt.org>2007-09-10 20:24:18 +0000
commitc4fa115e5ca6b90ea2c1cd36f0876818c6281200 (patch)
treeaa4c173403f743c3875a2af45b87c83ebde15597 /package/dnsmasq/files
parent114a03a429cd607af2d11121b64a2540e47a3d7f (diff)
downloadmtk-20170518-c4fa115e5ca6b90ea2c1cd36f0876818c6281200.zip
mtk-20170518-c4fa115e5ca6b90ea2c1cd36f0876818c6281200.tar.gz
mtk-20170518-c4fa115e5ca6b90ea2c1cd36f0876818c6281200.tar.bz2
add fix from ticket #2290
SVN-Revision: 8732
Diffstat (limited to 'package/dnsmasq/files')
-rw-r--r--package/dnsmasq/files/dnsmasq.init14
1 files changed, 10 insertions, 4 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index c39e584..cd5697c 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -2,6 +2,7 @@
# Copyright (C) 2007 OpenWrt.org
START=60
+DNS_SERVERS=""
dhcp_calc() {
local ip="$1"
@@ -173,6 +174,11 @@ dhcp_add() {
config_get ifname "$net" ifname
[ -n "$ifname" ] || return 0
+ config_get dnsserver "$net" dns
+ [ -n "$dnsserver" ] && {
+ DNS_SERVERS="$DNS_SERVERS $dnsserver"
+ }
+
append_bool "$cfg" ignore "-I $ifname"
config_get proto "$net" proto
@@ -234,10 +240,10 @@ start() {
/usr/sbin/dnsmasq $args && {
rm -f /tmp/resolv.conf
- cat > /tmp/resolv.conf <<EOF
-nameserver 127.0.0.1
-search lan
-EOF
+ DNS_SERVERS="$DNS_SERVERS 127.0.0.1"
+ for DNS_SERVER in $DNS_SERVERS ; do
+ echo "nameserver $DNS_SERVER" >> /tmp/resolv.conf
+ done
}
}