diff options
author | Jukka Rissanen <jukka.rissanen@linux.intel.com> | 2013-09-17 10:48:00 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-17 14:35:17 +0100 |
commit | 42ef04b3648f4e29ed130ff8e37800f5aac44b15 (patch) | |
tree | 6ca3a13ae6bea92b145784d9d97628135db8c9b6 /meta/recipes-connectivity/connman | |
parent | 06078af4cabefcd3a861821bd2f72b524a99c114 (diff) | |
download | poky-42ef04b3648f4e29ed130ff8e37800f5aac44b15.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]
(From OE-Core rev: 29be8e79a200d33555d2887578975e33b8417795)
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/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 2625adeead..bf7a94a06d 100644 --- a/meta/recipes-connectivity/connman/connman/connman +++ b/meta/recipes-connectivity/connman/connman/connman | |||
@@ -30,16 +30,23 @@ do_start() { | |||
30 | EXTRA_PARAM="" | 30 | EXTRA_PARAM="" |
31 | if test $nfsroot -eq 1 ; then | 31 | if test $nfsroot -eq 1 ; then |
32 | NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'` | 32 | NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'` |
33 | NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ ]*\):.*$/\1/p'` | 33 | NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'` |
34 | 34 | ||
35 | if [ x$NET_ADDR != x ]; then | 35 | if [ ! -z "$NET_ADDR" ]; then |
36 | for i in $NET_DEVS; do | 36 | if [ "$NET_ADDR" = dhcp ]; then |
37 | ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'` | 37 | ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` |
38 | if [ "$NET_ADDR" = "$ADDR" ]; then | 38 | if [ ! -z "$ethn" ]; then |
39 | EXTRA_PARAM="-I $i" | 39 | EXTRA_PARAM="-I $ethn" |
40 | break | ||
41 | fi | 40 | fi |
42 | done | 41 | else |
42 | for i in $NET_DEVS; do | ||
43 | ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'` | ||
44 | if [ "$NET_ADDR" = "$ADDR" ]; then | ||
45 | EXTRA_PARAM="-I $i" | ||
46 | break | ||
47 | fi | ||
48 | done | ||
49 | fi | ||
43 | fi | 50 | fi |
44 | fi | 51 | fi |
45 | if [ -f @LIBDIR@/connman/wired-setup ] ; then | 52 | if [ -f @LIBDIR@/connman/wired-setup ] ; then |