diff options
| author | Tom Hochstein <tom.hochstein@nxp.com> | 2022-09-07 13:38:33 -0500 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-09-09 12:24:42 +0100 |
| commit | b8baa464f050303950c810cf7892aac89fca120e (patch) | |
| tree | 21cb94266f4f4a53e7b18e627d29090cfe130c7b | |
| parent | 2d3394527cf3acf67d51b34ce9516e0227eacc9f (diff) | |
| download | poky-b8baa464f050303950c810cf7892aac89fca120e.tar.gz | |
connman: Drop redundant nfsroot handling
connman has nfsroot support built in since version 1.34 [1], so the
nfsroot handling in the init script is redundant.
[1] https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=ef0d26e6ef2b883193469f016117d8238c1c9658
(From OE-Core rev: 1aee9ea3feaef7a1832416954a4af07868be047b)
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-connectivity/connman/connman/connman | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman index 310a696863..a021fd4655 100644 --- a/meta/recipes-connectivity/connman/connman/connman +++ b/meta/recipes-connectivity/connman/connman/connman | |||
| @@ -10,48 +10,11 @@ fi | |||
| 10 | 10 | ||
| 11 | set -e | 11 | set -e |
| 12 | 12 | ||
| 13 | nfsroot=0 | ||
| 14 | |||
| 15 | exec 9<&0 < /proc/mounts | ||
| 16 | while read dev mtpt fstype rest; do | ||
| 17 | if test $mtpt = "/" ; then | ||
| 18 | case $fstype in | ||
| 19 | nfs | nfs4) | ||
| 20 | nfsroot=1 | ||
| 21 | break | ||
| 22 | ;; | ||
| 23 | *) | ||
| 24 | ;; | ||
| 25 | esac | ||
| 26 | fi | ||
| 27 | done | ||
| 28 | |||
| 29 | do_start() { | 13 | do_start() { |
| 30 | if test $nfsroot -eq 1 ; then | ||
| 31 | NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'` | ||
| 32 | NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'` | ||
| 33 | |||
| 34 | if [ ! -z "$NET_ADDR" ]; then | ||
| 35 | if [ "$NET_ADDR" = dhcp ]; then | ||
| 36 | ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` | ||
| 37 | if [ ! -z "$ethn" ]; then | ||
| 38 | EXTRA_PARAM="$EXTRA_PARAM -I $ethn" | ||
| 39 | fi | ||
| 40 | else | ||
| 41 | for i in $NET_DEVS; do | ||
| 42 | ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'` | ||
| 43 | if [ "$NET_ADDR" = "$ADDR" ]; then | ||
| 44 | EXTRA_PARAM="$EXTRA_PARAM -I $i" | ||
| 45 | break | ||
| 46 | fi | ||
| 47 | done | ||
| 48 | fi | ||
| 49 | fi | ||
| 50 | fi | ||
| 51 | if [ -f @DATADIR@/connman/wired-setup ] ; then | 14 | if [ -f @DATADIR@/connman/wired-setup ] ; then |
| 52 | . @DATADIR@/connman/wired-setup | 15 | . @DATADIR@/connman/wired-setup |
| 53 | fi | 16 | fi |
| 54 | $DAEMON $EXTRA_PARAM | 17 | $DAEMON |
| 55 | } | 18 | } |
| 56 | 19 | ||
| 57 | do_stop() { | 20 | do_stop() { |
