aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xnetwork-scripts/ifdown-eth6
1 files changed, 6 insertions, 0 deletions
diff --git a/network-scripts/ifdown-eth b/network-scripts/ifdown-eth
index 7b457e85..8d62200f 100755
--- a/network-scripts/ifdown-eth
+++ b/network-scripts/ifdown-eth
@@ -180,4 +180,10 @@ if [ -n "$VLAN" ]; then
fi
fi
+if [ "${TYPE}" = "Veth" ]; then
+ if [ $(ip link show ${PEER} up | wc -l) -eq 0 ]; then
+ ip link delete ${DEVICE}
+ fi
+fi
+
exit $retcode