summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2014-02-15 11:04:47 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-17 15:37:17 +0000
commit46bc59d87da18d7cd2d8d25fe96263efe5e57590 (patch)
treeb1096a00733ea4902bef6f30461d641449fca461 /scripts
parentb448cf77d9bf688c4bf8d41cc70664259cc7b1ea (diff)
downloadpoky-46bc59d87da18d7cd2d8d25fe96263efe5e57590.tar.gz
runqemu: add ability to skip using an existing tap device
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] (From OE-Core rev: 2e490f3b08176b20fe41c64cf17ecf3b5af61f39) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu-internal6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index f9ca380f26..d317dfd242 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -178,6 +178,10 @@ else
178 USE_PRECONF_TAP="no" 178 USE_PRECONF_TAP="no"
179 for tap in $POSSIBLE; do 179 for tap in $POSSIBLE; do
180 LOCKFILE="$LOCKDIR/$tap" 180 LOCKFILE="$LOCKDIR/$tap"
181 if [ -e "$LOCKFILE.skip" ]; then
182 echo "Found $LOCKFILE.skip, skipping $tap"
183 continue
184 fi
181 echo "Acquiring lockfile for $tap..." 185 echo "Acquiring lockfile for $tap..."
182 acquire_lock $LOCKFILE 186 acquire_lock $LOCKFILE
183 if [ $? -eq 0 ]; then 187 if [ $? -eq 0 ]; then
@@ -214,7 +218,7 @@ else
214 fi 218 fi
215 else 219 else
216 echo "Using preconfigured tap device '$TAP'" 220 echo "Using preconfigured tap device '$TAP'"
217 echo "If this is not intended, use flock on $LOCKFILE.lock to make runqemu skip $TAP." 221 echo "If this is not intended, touch $LOCKFILE.skip to make runqemu skip $TAP."
218 fi 222 fi
219 223
220 cleanup() { 224 cleanup() {