aboutsummaryrefslogtreecommitdiffstats
path: root/package
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
commite4b75a96c9dfb7c507ccca5f9a7da68dc8fd2e06 (patch)
treeffe5028f3218c7c17513404f5e65b56bba73b11b /package
parentda00875b1f4c93b39bb215275fadef8ace415217 (diff)
downloadmaster-187ad058-e4b75a96c9dfb7c507ccca5f9a7da68dc8fd2e06.tar.gz
master-187ad058-e4b75a96c9dfb7c507ccca5f9a7da68dc8fd2e06.tar.bz2
master-187ad058-e4b75a96c9dfb7c507ccca5f9a7da68dc8fd2e06.zip
add fix from ticket #2290
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8732 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-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 c39e58417f..cd5697c772 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
}
}