diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2013-08-28 10:52:04 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-30 16:20:31 +0100 |
commit | f60f215f74b5fe5a43943c9d3ccdbe0fa06b7828 (patch) | |
tree | f2ef2718d3d240d86101ab0d6e4433ecc9ae76a9 | |
parent | 32576c4cc1621fa3013eac66c7caaa1e1fd14995 (diff) | |
download | openembedded-core-contrib-f60f215f74b5fe5a43943c9d3ccdbe0fa06b7828.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.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/runqemu-internal | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index 8a6e551abc9..8165e13e5a1 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal @@ -175,12 +175,14 @@ else POSSIBLE=`$IFCONFIG link | grep 'tap' | awk '{print $2}' | sed s/://` TAP="" LOCKFILE="" + USE_PRECONF_TAP="no" for tap in $POSSIBLE; do LOCKFILE="$LOCKDIR/$tap" echo "Acquiring lockfile for $tap..." acquire_lock $LOCKFILE if [ $? -eq 0 ]; then TAP=$tap + USE_PRECONF_TAP="yes" break fi done @@ -215,7 +217,7 @@ else fi cleanup() { - if [ ! -e "$NOSUDO_FLAG" ]; then + if [ ! -e "$NOSUDO_FLAG" -a "$USE_PRECONF_TAP" = "no" ]; then # Redirect stderr since we could see a LD_PRELOAD warning here if pseudo is loaded # but inactive. This looks scary but is harmless sudo $QEMUIFDOWN $TAP $OECORE_NATIVE_SYSROOT 2> /dev/null |