]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: add ability to skip using an existing tap device
authorScott Garman <scott.a.garman@intel.com>
Sat, 15 Feb 2014 19:04:47 +0000 (11:04 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Feb 2014 15:36:17 +0000 (15:36 +0000)
Support the sitauation where a user could have another VM running
which uses tap devices. To prevent runqemu from trying to use the
same tap device, runqemu will skip using a tap device if it finds
a filename tapX.skip within its lock directory.

This fixes [YOCTO #5815]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu-internal

index f9ca380f2609651befb70cb0b31c82684badfe94..d317dfd2422422e00729549f1a696c492ef8a613 100755 (executable)
@@ -178,6 +178,10 @@ else
         USE_PRECONF_TAP="no"
         for tap in $POSSIBLE; do
             LOCKFILE="$LOCKDIR/$tap"
+            if [ -e "$LOCKFILE.skip" ]; then
+                echo "Found $LOCKFILE.skip, skipping $tap"
+                continue
+            fi
             echo "Acquiring lockfile for $tap..."
             acquire_lock $LOCKFILE
             if [ $? -eq 0 ]; then
@@ -214,7 +218,7 @@ else
             fi 
         else
             echo "Using preconfigured tap device '$TAP'"
-            echo "If this is not intended, use flock on $LOCKFILE.lock to make runqemu skip $TAP."
+            echo "If this is not intended, touch $LOCKFILE.skip to make runqemu skip $TAP."
         fi
 
         cleanup() {