aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Baruch Siach <baruch@tkos.co.il>2014-01-15 21:04:58 +0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2014-01-15 20:29:25 +0100
commitf70de3485947f290926b0ce8e6de648a4259bcc6 (patch)
tree34cd1d619ca1a9d23350995a12fed8fbfc2549f1
parent84179df8ae19657228583a394675a19eb96e8b8c (diff)
downloadbuildroot-f70de3485947f290926b0ce8e6de648a4259bcc6.tar.gz
buildroot-f70de3485947f290926b0ce8e6de648a4259bcc6.tar.bz2
busybox: udhcpc script: create resolv.conf
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>
-rwxr-xr-xpackage/busybox/udhcpc.script1
1 files changed, 1 insertions, 0 deletions
diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script
index 43742fbd53..9e08dadf5f 100755
--- a/package/busybox/udhcpc.script
+++ b/package/busybox/udhcpc.script
@@ -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"