summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/connman
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-09-06 10:23:00 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-06 23:04:49 +0100
commitc73487302270a7c2d3bbbb191ce1dd63ee2016dc (patch)
tree692442cad8ee8e7b1df86f06c9a1efbec4e92b2e /meta/recipes-connectivity/connman
parent12223c038c7cc82d352b542f715c27ad330e87f2 (diff)
downloadast2050-yocto-poky-c73487302270a7c2d3bbbb191ce1dd63ee2016dc.zip
ast2050-yocto-poky-c73487302270a7c2d3bbbb191ce1dd63ee2016dc.tar.gz
connman: Ignore the NFS root network interface in init script
The connman init.d script tried to ignore all the network interfaces if NFS root is configured. We should only ignore the interface that is used by NFS root. [YOCTO #4587] (From OE-Core rev: 1838671b832015ae28c8c101e8b20afbbf4b3c98) Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/connman')
-rw-r--r--meta/recipes-connectivity/connman/connman/connman14
1 files changed, 12 insertions, 2 deletions
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman
index 67ba7c8..2625ade 100644
--- a/meta/recipes-connectivity/connman/connman/connman
+++ b/meta/recipes-connectivity/connman/connman/connman
@@ -29,8 +29,18 @@ done
do_start() {
EXTRA_PARAM=""
if test $nfsroot -eq 1 ; then
- ethn=`ifconfig | grep eth | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"`
- EXTRA_PARAM="-I $ethn"
+ 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'`
+
+ 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
+ fi
+ done
+ fi
fi
if [ -f @LIBDIR@/connman/wired-setup ] ; then
. @LIBDIR@/connman/wired-setup
OpenPOWER on IntegriCloud