Detach of unattached container succeeds silently
This commit is contained in:
1 parent
840a493e62
commit
cf299f59de
1 file changed
+2
@@ -392,6 +392,8 @@ attach() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
detach() {
|
detach() {
|
||||||
|
netnsenter ip link show $CONTAINER_IFNAME >/dev/null 2>&1 || return 0
|
||||||
|
|
||||||
for ADDR; do
|
for ADDR; do
|
||||||
if ! netnsenter ip addr show dev $CONTAINER_IFNAME | grep -F $ADDR >/dev/null ; then
|
if ! netnsenter ip addr show dev $CONTAINER_IFNAME | grep -F $ADDR >/dev/null ; then
|
||||||
# address is not there, leave the device alone
|
# address is not there, leave the device alone
|
||||||
|
|||||||
Reference in new issue
Block a user