From 771fb55d6b13a92e1b30fbc95fdb1c34ddec7ebe Mon Sep 17 00:00:00 2001 From: Dongxiao Xu Date: Mon, 11 Oct 2010 15:48:03 +0800 Subject: connman: Do not take over ethernet interface if target is boot by nfs Detect if target system is booting by nfs, connman will not take over the ethernet interface. This fixes [BUGID #364] Signed-off-by: Dongxiao Xu --- .../connman/connman-0.56/connman | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'meta/recipes-connectivity/connman/connman-0.56') diff --git a/meta/recipes-connectivity/connman/connman-0.56/connman b/meta/recipes-connectivity/connman/connman-0.56/connman index f8154f68f9..f01bf371c2 100755 --- a/meta/recipes-connectivity/connman/connman-0.56/connman +++ b/meta/recipes-connectivity/connman/connman-0.56/connman @@ -10,8 +10,28 @@ fi set -e +nfsroot=0 + +exec 9<&0 < /proc/mounts +while read dev mtpt fstype rest; do + if test $mtpt = "/" ; then + case $fstype in + nfs | nfs4) + nfsroot=1 + break + ;; + *) + ;; + esac + fi +done + do_start() { - $DAEMON + EXTRA_PARAM="" + if test $nfsroot -eq 1 ; then + EXTRA_PARAM="-P ethernet" + fi + $DAEMON $EXTRA_PARAM } do_stop() { -- cgit v1.2.3-54-g00ecf