summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-internal
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2013-08-28 10:52:04 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-30 16:23:47 +0100
commita78bf1ce7bc41ff96f17c532179be517d6474978 (patch)
tree6422b617c11bb617e7b0a25fdf0a877910a4f28f /scripts/runqemu-internal
parent8f32af94c03854c321ad4fd6016b64d7eda533bf (diff)
downloadpoky-a78bf1ce7bc41ff96f17c532179be517d6474978.tar.gz
runqemu-internal: don't bring down preconfigured tap interface
runqemu-ifup and runqemu-ifdown should be pairs. If we're using a preconfigured tap interface, the runqemu-ifdown should not be invoked to bring it down. (From OE-Core rev: f60f215f74b5fe5a43943c9d3ccdbe0fa06b7828) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu-internal')
-rwxr-xr-xscripts/runqemu-internal4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 8a6e551abc..8165e13e5a 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -175,12 +175,14 @@ else
175 POSSIBLE=`$IFCONFIG link | grep 'tap' | awk '{print $2}' | sed s/://` 175 POSSIBLE=`$IFCONFIG link | grep 'tap' | awk '{print $2}' | sed s/://`
176 TAP="" 176 TAP=""
177 LOCKFILE="" 177 LOCKFILE=""
178 USE_PRECONF_TAP="no"
178 for tap in $POSSIBLE; do 179 for tap in $POSSIBLE; do
179 LOCKFILE="$LOCKDIR/$tap" 180 LOCKFILE="$LOCKDIR/$tap"
180 echo "Acquiring lockfile for $tap..." 181 echo "Acquiring lockfile for $tap..."
181 acquire_lock $LOCKFILE 182 acquire_lock $LOCKFILE
182 if [ $? -eq 0 ]; then 183 if [ $? -eq 0 ]; then
183 TAP=$tap 184 TAP=$tap
185 USE_PRECONF_TAP="yes"
184 break 186 break
185 fi 187 fi
186 done 188 done
@@ -215,7 +217,7 @@ else
215 fi 217 fi
216 218
217 cleanup() { 219 cleanup() {
218 if [ ! -e "$NOSUDO_FLAG" ]; then 220 if [ ! -e "$NOSUDO_FLAG" -a "$USE_PRECONF_TAP" = "no" ]; then
219 # Redirect stderr since we could see a LD_PRELOAD warning here if pseudo is loaded 221 # Redirect stderr since we could see a LD_PRELOAD warning here if pseudo is loaded
220 # but inactive. This looks scary but is harmless 222 # but inactive. This looks scary but is harmless
221 sudo $QEMUIFDOWN $TAP $OECORE_NATIVE_SYSROOT 2> /dev/null 223 sudo $QEMUIFDOWN $TAP $OECORE_NATIVE_SYSROOT 2> /dev/null