1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

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
This commit is contained in:
nbd
2007-01-08 21:33:53 +00:00
parent a6f470987e
commit 5ad62fbdd3
9 changed files with 15 additions and 9 deletions

View File

@@ -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

View File

@@ -1,2 +0,0 @@
nameserver 127.0.0.1
search lan

View File

@@ -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
}

View File

@@ -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