diff options
-rwxr-xr-x | scripts/runqemu-ifdown | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/runqemu-ifdown b/scripts/runqemu-ifdown index ffbc9de442..2486968588 100755 --- a/scripts/runqemu-ifdown +++ b/scripts/runqemu-ifdown | |||
@@ -51,6 +51,16 @@ fi | |||
51 | 51 | ||
52 | $TUNCTL -d $TAP | 52 | $TUNCTL -d $TAP |
53 | 53 | ||
54 | IFCONFIG=`which ip 2> /dev/null` | ||
55 | if [ "x$IFCONFIG" = "x" ]; then | ||
56 | # better than nothing... | ||
57 | IFCONFIG=/sbin/ip | ||
58 | fi | ||
59 | if [ -x "$IFCONFIG" ]; then | ||
60 | if `$IFCONFIG link show $TAP > /dev/null 2>&1`; then | ||
61 | $IFCONFIG link del $TAP | ||
62 | fi | ||
63 | fi | ||
54 | # cleanup the remaining iptables rules | 64 | # cleanup the remaining iptables rules |
55 | IPTABLES=`which iptables 2> /dev/null` | 65 | IPTABLES=`which iptables 2> /dev/null` |
56 | if [ "x$IPTABLES" = "x" ]; then | 66 | if [ "x$IPTABLES" = "x" ]; then |