summaryrefslogtreecommitdiff
path: root/package/dnsmasq/files
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-01-08 21:33:53 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2007-01-08 21:33:53 +0000
commit5ad62fbdd3e65c841a917ee5f2d1fc238921078c (patch)
treeb9a2ebbf00ba84edd0eedc59e8163746df3a8db6 /package/dnsmasq/files
parenta6f470987e6035ee650e95b996ca96980f6d92bc (diff)
Forward port whiterussian resolv.conf changes
/etc/resolv.conf links to /tmp/resolv.conf /tmp/resolv.conf links to /tmp/resolv.conf.auto by default (which is where the ISPs nameserver is in) When dnsmasq starts, it replaces /tmp/resolv.conf with a file pointing to 127.0.0.1 git-svn-id: svn://svn.openwrt.org/openwrt/trunk@6043 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/dnsmasq/files')
-rw-r--r--package/dnsmasq/files/dnsmasq.conf2
-rw-r--r--package/dnsmasq/files/dnsmasq.init8
2 files changed, 8 insertions, 2 deletions
diff --git a/package/dnsmasq/files/dnsmasq.conf b/package/dnsmasq/files/dnsmasq.conf
index 8a51f8445d..8a8191b635 100644
--- a/package/dnsmasq/files/dnsmasq.conf
+++ b/package/dnsmasq/files/dnsmasq.conf
@@ -8,7 +8,7 @@ localise-queries
local=/lan/
domain=lan
expand-hosts
-resolv-file=/tmp/resolv.conf
+resolv-file=/tmp/resolv.conf.auto
@ifdef dhcp_enable
dhcp-range=@@start@@,@@end@@,@@netmask@@,@@lease@@
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 7afcee420e..5e72fd014f 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -50,7 +50,13 @@ start() {
[ -z "$wan_proto" -o "$wan_proto" = "none" ] || echo "@define wan_ifname $wan_ifname"
cat /etc/dnsmasq.conf
- ) | awk -f /lib/config/template.awk | dnsmasq -C /proc/self/fd/0
+ ) | awk -f /lib/config/template.awk | dnsmasq -C /proc/self/fd/0 && {
+ rm -f /tmp/resolv.conf
+ cat > /tmp/resolv.conf <<EOF
+nameserver 127.0.0.1
+search lan
+EOF
+ }
}
stop() {