From 6a672cf8bc8da414952039d5a07a6c42f55f658c Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Wed, 28 Oct 2015 18:23:15 +0000 Subject: [PATCH] tiny refactor: more idiomatic referal to process' /proc --- weave | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weave b/weave index 3e954067..3e5de581 100755 --- a/weave +++ b/weave @@ -697,7 +697,7 @@ setup_router_iface_bridge() { } attach() { - if [ -h "$PROCFS/$CONTAINER_PID/ns/net" -a -h "/proc/$$/ns/net" -a "$(readlink $PROCFS/$CONTAINER_PID/ns/net)" = "$(readlink /proc/$$/ns/net)" ] ; then + if [ -h "$PROCFS/$CONTAINER_PID/ns/net" -a -h "/proc/self/ns/net" -a "$(readlink $PROCFS/$CONTAINER_PID/ns/net)" = "$(readlink /proc/self/ns/net)" ] ; then echo "Container is running in the host network namespace, and therefore cannot be" >&2 echo "connected to weave. Perhaps the container was started with --net=host." >&2 return 1