diff mbox

busybox: udhcpc script: create resolv.conf

Message ID 2c4d5dc2aabdcbea6f0b2395f90f30dd4d2a3710.1389812698.git.baruch@tkos.co.il
State Accepted
Commit f70de3485947f290926b0ce8e6de648a4259bcc6
Headers show

Commit Message

Baruch Siach Jan. 15, 2014, 7:04 p.m. UTC
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>
---
 package/busybox/udhcpc.script | 1 +
 1 file changed, 1 insertion(+)

Comments

Peter Korsgaard Jan. 15, 2014, 7:29 p.m. UTC | #1
>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > 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>

Committed, thanks.
diff mbox

Patch

diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script
index 43742fbd5302..9e08dadf5f4e 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"