busybox: udhcpc script: create resolv.conf
authorBaruch Siach <baruch@tkos.co.il>
Wed, 15 Jan 2014 19:04:58 +0000 (21:04 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 15 Jan 2014 19:29:25 +0000 (20:29 +0100)
Eliminate the following error message on every boot:

grep: /etc/resolv.conf: No such file or directory

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/busybox/udhcpc.script

index 43742fbd530269c5a45edb5fdc22f191fce571ac..9e08dadf5f4e2b69d8cf7f338906ee34fa3737db 100755 (executable)
@@ -5,6 +5,7 @@
 [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
 
 RESOLV_CONF="/etc/resolv.conf"
+[ -e $RESOLV_CONF ] || touch $RESOLV_CONF
 [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
 [ -n "$subnet" ] && NETMASK="netmask $subnet"