Index: package/base-files/default/etc/functions.sh =================================================================== --- package/base-files/default/etc/functions.sh (revision 5466) +++ package/base-files/default/etc/functions.sh (working copy) @@ -60,12 +60,11 @@ } done } - [ -f /tmp/resolv.conf.auto ] || { - debug "# --- creating /tmp/resolv.conf.auto ---" - for dns in $(nvram get ${2}_dns); do - echo "nameserver $dns" >> /tmp/ resolv.conf.auto - done - } + debug "# --- updating /tmp/resolv.conf.auto ---" + for dns in $(nvram get ${2}_dns); do + grep "^nameserver $dns" /tmp/resolv.conf.auto >/dev/null 2>&1 || \ + echo "nameserver $dns" >> /tmp/resolv.conf.auto + done env -i ACTION="ifup" INTERFACE="${2}" PROTO=static /sbin/hotplug "iface" & ;;