[Buildroot] [git commit] busybox: udhcpc script: create resolv.conf
Peter Korsgaard
peter at korsgaard.com
Wed Jan 15 19:29:25 UTC 2014
commit: http://git.buildroot.net/buildroot/commit/?id=f70de3485947f290926b0ce8e6de648a4259bcc6
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master
Eliminate the following error message on every boot:
grep: /etc/resolv.conf: No such file or directory
Signed-off-by: Baruch Siach <baruch at tkos.co.il>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
package/busybox/udhcpc.script | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script
index 43742fb..9e08dad 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"
More information about the buildroot
mailing list