]> code.ossystems Code Review - openembedded-core.git/commitdiff
connman: Do not take over ethernet interface if target is boot by nfs
authorDongxiao Xu <dongxiao.xu@intel.com>
Mon, 11 Oct 2010 07:48:03 +0000 (15:48 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Mon, 11 Oct 2010 11:22:39 +0000 (12:22 +0100)
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 <dongxiao.xu@intel.com>
meta/recipes-connectivity/connman/connman-0.56/connman
meta/recipes-connectivity/connman/connman_0.56.bb

index f8154f68f923687b055df0778f92ab4ab8b0080b..f01bf371c2a662a405d9a0a22696d8d907c1047b 100755 (executable)
@@ -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() {
index 69dad66d58f965f8195d04db066966a32fa548ce..665da32f03ec2775d1f43015e85987b05f3b87f7 100644 (file)
@@ -1,5 +1,5 @@
 require connman.inc
-PR = "r1"
+PR = "r2"
 
 EXTRA_OECONF += "\
   ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \