aboutsummaryrefslogtreecommitdiffstats
path: root/package/dnsmasq/files/dnsmasq.init
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-01-08 21:33:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-01-08 21:33:53 +0000
commitbd078bad0f43a6de264129b083cf7887d3c2d8d6 (patch)
treeb9a2ebbf00ba84edd0eedc59e8163746df3a8db6 /package/dnsmasq/files/dnsmasq.init
parent403290693826436e69959af15aae9ad1a2ca1dc4 (diff)
downloadmaster-187ad058-bd078bad0f43a6de264129b083cf7887d3c2d8d6.tar.gz
master-187ad058-bd078bad0f43a6de264129b083cf7887d3c2d8d6.tar.bz2
master-187ad058-bd078bad0f43a6de264129b083cf7887d3c2d8d6.zip
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/dnsmasq.init')
-rw-r--r--package/dnsmasq/files/dnsmasq.init8
1 files changed, 7 insertions, 1 deletions
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() {