From 81b7893dd1627c43464064e670583803aca2d5ff Mon Sep 17 00:00:00 2001 From: Geiger Date: Tue, 7 Mar 2017 17:23:08 +0200 Subject: ifdown removes veth pair if both peers are down --- network-scripts/ifdown-eth | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- cgit v1.2.1