tiny refactor: more idiomatic referal to process' /proc

This commit is contained in:
Matthias Radestock committed 2015-10-28 18:23:15 +00:00
1 parent 036b7d9f66
commit 6a672cf8bc
1 file changed
+1 -1
+1 -1
View File
@@ -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