diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-01-11 23:14:39 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-12 07:19:35 +0000 |
commit | a8e6024a023c0f04dd5283dc772cc17fb04c8624 (patch) | |
tree | e02f0fb38af7987d54e1e8c9848d8544e1096234 /meta/recipes-connectivity/connman/connman | |
parent | d907c29262d3155fe39297361b0d2eeb8d74ac18 (diff) | |
download | poky-a8e6024a023c0f04dd5283dc772cc17fb04c8624.tar.gz |
connman-conf: do nothing in qemu, do not touch eth0
qemu kernel itself is nowdays perfectly capable of setting up
what was passed in via ip=:
[ 1.676847] IP-Config: Complete:
[ 1.677768] device=eth0, hwaddr=52:54:00:12:34:02, ipaddr=192.168.7.2, mask=255.255.255.0, gw=192.168.7.1
[ 1.679933] host=192.168.7.2, domain=, nis-domain=(none)
[ 1.681201] bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
[ 1.681203] nameserver0=8.8.8.8
connman-conf only does the same thing again by (badly and incompletely)
parsing those parameters with sed.
(From OE-Core rev: 3c25b89720417a7b1963f0a32c870208a5803950)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/connman/connman')
-rw-r--r-- | meta/recipes-connectivity/connman/connman/connman | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman index c64fa0d715..310a696863 100644 --- a/meta/recipes-connectivity/connman/connman/connman +++ b/meta/recipes-connectivity/connman/connman/connman | |||
@@ -27,7 +27,6 @@ while read dev mtpt fstype rest; do | |||
27 | done | 27 | done |
28 | 28 | ||
29 | do_start() { | 29 | do_start() { |
30 | EXTRA_PARAM="" | ||
31 | if test $nfsroot -eq 1 ; then | 30 | if test $nfsroot -eq 1 ; then |
32 | NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'` | 31 | 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'` | 32 | NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'` |
@@ -36,13 +35,13 @@ do_start() { | |||
36 | if [ "$NET_ADDR" = dhcp ]; then | 35 | if [ "$NET_ADDR" = dhcp ]; then |
37 | ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` | 36 | ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` |
38 | if [ ! -z "$ethn" ]; then | 37 | if [ ! -z "$ethn" ]; then |
39 | EXTRA_PARAM="-I $ethn" | 38 | EXTRA_PARAM="$EXTRA_PARAM -I $ethn" |
40 | fi | 39 | fi |
41 | else | 40 | else |
42 | for i in $NET_DEVS; do | 41 | for i in $NET_DEVS; do |
43 | ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'` | 42 | ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'` |
44 | if [ "$NET_ADDR" = "$ADDR" ]; then | 43 | if [ "$NET_ADDR" = "$ADDR" ]; then |
45 | EXTRA_PARAM="-I $i" | 44 | EXTRA_PARAM="$EXTRA_PARAM -I $i" |
46 | break | 45 | break |
47 | fi | 46 | fi |
48 | done | 47 | done |