Detach of unattached container succeeds silently

This commit is contained in:
Adam Harrison committed 2015-04-28 11:26:31 +01:00
1 parent 840a493e62
commit cf299f59de
1 file changed
+2
+2
View File
@@ -392,6 +392,8 @@ attach() {
}
detach() {
netnsenter ip link show $CONTAINER_IFNAME >/dev/null 2>&1 || return 0
for ADDR; do
if ! netnsenter ip addr show dev $CONTAINER_IFNAME | grep -F $ADDR >/dev/null ; then
# address is not there, leave the device alone