summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox
diff options
context:
space:
mode:
authoryadi.hu@windriver.com <yadi.hu@windriver.com>2014-10-24 08:33:27 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-12-31 10:18:30 +0000
commit044039dc8e6d8846b2f609d0daaaf719c319a802 (patch)
treea404305c705b843998a6e933dbeba0efdd84d90e /meta/recipes-core/busybox
parent0bc80a385002a707dbe01cb78416db1d10471905 (diff)
downloadpoky-044039dc8e6d8846b2f609d0daaaf719c319a802.tar.gz
BusyBox: Fixing broadcast address is not fed and rightly initialized
When using udhcpc along with ip command(/sbin/ip), broadcast address is not assigned. Broadcast address is successfully assigned when using udhcpc without ip command existence. with ip command: $ifconfig eth0|grep Bcast inet addr:128.224.162.141 Bcast:0.0.0.0 Mask:255.255.254.0 $ without ip command: $ifconfig eth0|grep Bcast inet addr:128.224.162.141 Bcast:128.224.163.255 Mask:255.255.254.0 $ /etc/udhcp.d/50default[simple.script] is called to set ip address by dhcp client, In case of ifconfig, it doesn't care of it's existence because it will automatically calculate broadcast address then assign it if there is no broadcast option. However in case of ip command, it requires broadcast address statically. (From OE-Core rev: 666c6a126cd12d2555361f5b573b6a26437df780) (From OE-Core rev: 479baa37ba366f5371fbc35d95d39e27f9b14cd2) Signed-off-by: Hu <yadi.hu@windriver.com> Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/busybox')
-rw-r--r--meta/recipes-core/busybox/files/simple.script4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script
index 78ac4242a8..757e487b97 100644
--- a/meta/recipes-core/busybox/files/simple.script
+++ b/meta/recipes-core/busybox/files/simple.script
@@ -5,7 +5,6 @@
5[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 5[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
6 6
7RESOLV_CONF="/etc/resolv.conf" 7RESOLV_CONF="/etc/resolv.conf"
8[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
9[ -n "$subnet" ] && NETMASK="netmask $subnet" 8[ -n "$subnet" ] && NETMASK="netmask $subnet"
10 9
11# return 0 if root is mounted on a network filesystem 10# return 0 if root is mounted on a network filesystem
@@ -17,8 +16,11 @@ root_is_nfs() {
17have_bin_ip=0 16have_bin_ip=0
18if [ -x /sbin/ip ]; then 17if [ -x /sbin/ip ]; then
19 have_bin_ip=1 18 have_bin_ip=1
19 BROADCAST="broadcast +"
20fi 20fi
21 21
22[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
23
22case "$1" in 24case "$1" in
23 deconfig) 25 deconfig)
24 if [ -x /sbin/resolvconf ]; then 26 if [ -x /sbin/resolvconf ]; then