From: Felix Fietkau Date: Tue, 25 Jul 2006 18:12:30 +0000 (+0000) Subject: use 127.0.0.1 as dns server and point dnsmasq to /tmp/resolv.conf X-Git-Tag: whiterussian_rc6~189 X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=72cdfd4ad7123aee4f1192afc9c8183f6f4a8ad2;p=openwrt%2Fsvn-archive%2Fopenwrt.git use 127.0.0.1 as dns server and point dnsmasq to /tmp/resolv.conf SVN-Revision: 4282 --- diff --git a/openwrt/package/base-files/Makefile b/openwrt/package/base-files/Makefile index 836dc5673f..dfe7c38664 100644 --- a/openwrt/package/base-files/Makefile +++ b/openwrt/package/base-files/Makefile @@ -50,7 +50,6 @@ $(IPKG_BASE): mkdir -p $(IDIR_BASE)/usr/lib mkdir -p $(IDIR_BASE)/usr/bin mkdir -p $(IDIR_BASE)/www - ln -sf /tmp/resolv.conf $(IDIR_BASE)/etc/resolv.conf rm -f $(IDIR_BASE)/var ln -sf /tmp $(IDIR_BASE)/var -find $(IDIR_BASE) -type d -name CVS | xargs rm -rf diff --git a/openwrt/package/base-files/default/etc/functions.sh b/openwrt/package/base-files/default/etc/functions.sh index 8072c9ac62..966615b350 100755 --- a/openwrt/package/base-files/default/etc/functions.sh +++ b/openwrt/package/base-files/default/etc/functions.sh @@ -52,10 +52,10 @@ do_ifup() { } done } - [ -f /etc/resolv.conf ] || { - debug "# --- creating /etc/resolv.conf ---" + [ -f /tmp/resolv.conf ] || { + debug "# --- creating /tmp/resolv.conf ---" for dns in $(nvram get ${2}_dns); do - echo "nameserver $dns" >> /etc/resolv.conf + echo "nameserver $dns" >> /tmp/resolv.conf done } diff --git a/openwrt/package/base-files/default/etc/resolv.conf b/openwrt/package/base-files/default/etc/resolv.conf new file mode 100644 index 0000000000..9617eacda7 --- /dev/null +++ b/openwrt/package/base-files/default/etc/resolv.conf @@ -0,0 +1,2 @@ +nameserver 127.0.0.1 +search lan diff --git a/openwrt/package/dnsmasq/files/dnsmasq.conf b/openwrt/package/dnsmasq/files/dnsmasq.conf index d4a9f082ca..50ddb01e88 100644 --- a/openwrt/package/dnsmasq/files/dnsmasq.conf +++ b/openwrt/package/dnsmasq/files/dnsmasq.conf @@ -9,6 +9,8 @@ local=/lan/ domain=lan expand-hosts +resolv-file=/tmp/resolv.conf + # enable dhcp (start,end,netmask,leasetime) dhcp-authoritative #dhcp-range=192.168.1.100,192.168.1.250,255.255.255.0,12h