From: "yadi...@windriver.com" <yadi...@windriver.com> 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. Signed-off-by: Hu <yadi...@windriver.com> Signed-off-by: Roy Li <rongqing...@windriver.com> --- meta/recipes-core/busybox/files/simple.script | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/recipes-core/busybox/files/simple.script b/meta/recipes-core/busybox/files/simple.script index 78ac424..90002b1 100644 --- a/meta/recipes-core/busybox/files/simple.script +++ b/meta/recipes-core/busybox/files/simple.script @@ -5,7 +5,6 @@ [ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 RESOLV_CONF="/etc/resolv.conf" -[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" [ -n "$subnet" ] && NETMASK="netmask $subnet" # return 0 if root is mounted on a network filesystem @@ -17,8 +16,11 @@ root_is_nfs() { have_bin_ip=0 if [ -x /sbin/ip ]; then have_bin_ip=1 + BROADCAST="broadcast +" fi +[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" + case "$1" in deconfig) if [ -x /sbin/resolvconf ]; then -- 1.7.10.4 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core