diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-01-08 21:33:53 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-01-08 21:33:53 +0000 |
commit | 656412d1a3806d94b280a9955df528faad6aa8e9 (patch) | |
tree | 012a0788f3f546b5540756e0ee6a57aa223319b7 /package/base-files | |
parent | cd10aa726f1803513f172fff4c194a3cdcb868a3 (diff) | |
download | mtk-20170518-656412d1a3806d94b280a9955df528faad6aa8e9.zip mtk-20170518-656412d1a3806d94b280a9955df528faad6aa8e9.tar.gz mtk-20170518-656412d1a3806d94b280a9955df528faad6aa8e9.tar.bz2 |
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
SVN-Revision: 6043
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/Makefile | 1 | ||||
-rwxr-xr-x | package/base-files/files/etc/init.d/boot | 1 | ||||
-rw-r--r-- | package/base-files/files/etc/resolv.conf | 2 | ||||
-rwxr-xr-x | package/base-files/files/lib/network/config.sh | 4 | ||||
-rwxr-xr-x | package/base-files/files/usr/share/udhcpc/default.script | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 16c6dc1..14917f6 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -115,6 +115,7 @@ define Package/base-files$(TARGET)/install rm -f $(1)/var ln -sf /tmp $(1)/var mkdir -p $(1)/etc + ln -sf /tmp/resolv.conf $(1)/etc/resolv.conf $(call Package/base-files/install-target,$(1)) for conffile in $(1)/etc/config/*; do \ if [ -f "$$$$conffile" ]; then \ diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot index c583652..db7ec8c 100755 --- a/package/base-files/files/etc/init.d/boot +++ b/package/base-files/files/etc/init.d/boot @@ -15,6 +15,7 @@ start() { mkdir -p /var/lock touch /var/log/wtmp touch /var/log/lastlog + ln -s /tmp/resolv.conf.auto /tmp/resolv.conf [ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe # manually trigger hotplug before loading modules diff --git a/package/base-files/files/etc/resolv.conf b/package/base-files/files/etc/resolv.conf deleted file mode 100644 index 9617eac..0000000 --- a/package/base-files/files/etc/resolv.conf +++ /dev/null @@ -1,2 +0,0 @@ -nameserver 127.0.0.1 -search lan diff --git a/package/base-files/files/lib/network/config.sh b/package/base-files/files/lib/network/config.sh index 845b33e..f3ead6a 100755 --- a/package/base-files/files/lib/network/config.sh +++ b/package/base-files/files/lib/network/config.sh @@ -120,9 +120,9 @@ setup_interface() { $DEBUG ifconfig "$iface" "$ipaddr" netmask "$netmask" $DEBUG ifconfig "$iface" inet6 add "$ip6addr" [ -z "$gateway" ] || route add default gw "$gateway" - [ -z "$dns" -o -f /tmp/resolv.conf ] || { + [ -z "$dns" -o -f /tmp/resolv.conf.auto ] || { for ns in $dns; do - echo "nameserver $ns" >> /tmp/resolv.conf + echo "nameserver $ns" >> /tmp/resolv.conf.auto done } diff --git a/package/base-files/files/usr/share/udhcpc/default.script b/package/base-files/files/usr/share/udhcpc/default.script index 53c8faf..f39d21e 100755 --- a/package/base-files/files/usr/share/udhcpc/default.script +++ b/package/base-files/files/usr/share/udhcpc/default.script @@ -3,7 +3,7 @@ . /etc/functions.sh include /lib/network -RESOLV_CONF="/tmp/resolv.conf" +RESOLV_CONF="/tmp/resolv.conf.auto" hotplug_event() { scan_interfaces |