This behavior is different to the behavior of the DHCP Client under debian/ubuntu where an empty DNS entry will not delete the existing /etc/resolv.conf example: udhcpc -i eth0 udhcpc (v1.20.2) started Sending discover... Sending select for 10.0.2.15... Lease of 10.0.2.15 obtained, lease time 86400 deleting routers route: SIOCDELRT: No such process adding dns 10.0.2.2 sets /etc/resolv.conf: search me nameserver 10.0.2.2 udhcpc -i eth1 udhcpc (v1.20.2) started Sending discover... Sending select for 192.168.56.105... Lease of 192.168.56.105 obtained, lease time 1200 sets /etc/resolv.conf (empty): I suggest to only reset /resov.conf in case of an existing nameserver entry: /usr/share/udhcpc/default.script @@ -28,7 +28,9 @@ case "$1" in done fi - echo -n > $RESOLV_CONF + if [ -n "$dns" ] ; then + echo -n > $RESOLV_CONF + fi [ -n "$domain" ] && echo search $domain >> $RESOLV_CONF for i in $dns ; do echo adding dns $i --
Fixed in git. However, using scripts which rewrite resolv.conf *only* based on DHCP data is bound to be problematic in a lot of non-trivial networking setups. You *can't* fix the script to work well for everybody. Please read http://busybox.net/~vda/no_ifup.txt