[oe-commits] Jukka Rissanen : connman: Try to figure out NFS root interface if using DHCP
git at git.openembedded.org
git at git.openembedded.org
Tue Sep 17 13:23:50 UTC 2013
Module: openembedded-core.git
Branch: master-next
Commit: 29be8e79a200d33555d2887578975e33b8417795
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=29be8e79a200d33555d2887578975e33b8417795
Author: Jukka Rissanen <jukka.rissanen at linux.intel.com>
Date: Tue Sep 17 10:48:00 2013 +0300
connman: Try to figure out NFS root interface if using DHCP
The commit c73487302270a7c2d3bbbb191ce1dd63ee2016dc missed the case
where the NFS is using DHCP.
[YOCTO #5176]
Signed-off-by: Jukka Rissanen <jukka.rissanen at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-connectivity/connman/connman/connman | 23 +++++++++++++-------
1 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman
index 2625ade..bf7a94a 100644
--- a/meta/recipes-connectivity/connman/connman/connman
+++ b/meta/recipes-connectivity/connman/connman/connman
@@ -30,16 +30,23 @@ do_start() {
EXTRA_PARAM=""
if test $nfsroot -eq 1 ; then
NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'`
- NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ ]*\):.*$/\1/p'`
+ NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'`
- if [ x$NET_ADDR != x ]; then
- for i in $NET_DEVS; do
- ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'`
- if [ "$NET_ADDR" = "$ADDR" ]; then
- EXTRA_PARAM="-I $i"
- break
+ if [ ! -z "$NET_ADDR" ]; then
+ if [ "$NET_ADDR" = dhcp ]; then
+ ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"`
+ if [ ! -z "$ethn" ]; then
+ EXTRA_PARAM="-I $ethn"
fi
- done
+ else
+ for i in $NET_DEVS; do
+ ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'`
+ if [ "$NET_ADDR" = "$ADDR" ]; then
+ EXTRA_PARAM="-I $i"
+ break
+ fi
+ done
+ fi
fi
fi
if [ -f @LIBDIR@/connman/wired-setup ] ; then
More information about the Openembedded-commits
mailing list