Forward port whiterussian resolv.conf changes /etc/resolv.conf links to /tmp/resolv...
[openwrt/openwrt.git] / package / dnsmasq / files / dnsmasq.init
index 8ac0ab638d3aa97786e71260a6983f14f125b4b8..5e72fd014f59d22271a01e2ef529b91da6b782b9 100644 (file)
@@ -1,6 +1,7 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2006 OpenWrt.org
 
+START=60
 start() {
        include /lib/network
        scan_interfaces
@@ -49,7 +50,13 @@ start() {
                [ -z "$wan_proto" -o "$wan_proto" = "none" ] || echo "@define wan_ifname $wan_ifname"
        
                cat /etc/dnsmasq.conf
-       ) | awk -f /usr/lib/parse-config.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() {