summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-ifdown
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/runqemu-ifdown')
-rwxr-xr-xscripts/runqemu-ifdown14
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/runqemu-ifdown b/scripts/runqemu-ifdown
index e0eb5344c6..f72166b32b 100755
--- a/scripts/runqemu-ifdown
+++ b/scripts/runqemu-ifdown
@@ -33,13 +33,15 @@ fi
33TAP=$1 33TAP=$1
34STAGING_BINDIR_NATIVE=$2 34STAGING_BINDIR_NATIVE=$2
35 35
36TUNCTL=$STAGING_BINDIR_NATIVE/tunctl 36if !ip tuntap del $TAP mode tap 2>/dev/null; then
37if [ ! -e "$TUNCTL" ]; then 37 TUNCTL=$STAGING_BINDIR_NATIVE/tunctl
38 echo "Error: Unable to find tunctl binary in '$STAGING_BINDIR_NATIVE', please bitbake qemu-helper-native" 38 if [ ! -e "$TUNCTL" ]; then
39 exit 1 39 echo "Error: Unable to find tunctl binary in '$STAGING_BINDIR_NATIVE', please bitbake qemu-helper-native"
40fi 40 exit 1
41 fi
41 42
42$TUNCTL -d $TAP 43 $TUNCTL -d $TAP
44fi
43 45
44IFCONFIG=`which ip 2> /dev/null` 46IFCONFIG=`which ip 2> /dev/null`
45if [ "x$IFCONFIG" = "x" ]; then 47if [ "x$IFCONFIG" = "x" ]; then