aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-09-17 10:48:00 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-17 14:13:27 +0100
commit29be8e79a200d33555d2887578975e33b8417795 (patch)
tree5dd523aeda0201b085140fd6a1838c4b91c5ca2b /meta
parente6c60252ab4ba6842f63c6b8a519a85f2ff238fb (diff)
downloadopenembedded-core-contrib-29be8e79a200d33555d2887578975e33b8417795.tar.gz
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@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/connman/connman/connman23
1 files changed, 15 insertions, 8 deletions
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman
index 2625adeead..bf7a94a06d 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