From d9ea3b44a10345cdc94c213e8dbfa6ce9f3b0440 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Thu, 27 Nov 2014 09:56:12 +0000 Subject: [PATCH] always mark the interface as 'up' last since that kinda acts as a marker that everything is ready --- weave | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/weave b/weave index ecc29a3a..406d9381 100755 --- a/weave +++ b/weave @@ -216,8 +216,8 @@ connect_container_to_bridge() { launch() { connect_container_to_bridge && - ip netns exec $NETNS ip link set $CONTAINER_IFNAME up && - check_command_and_run_anything ethtool ip netns exec $NETNS ethtool -K eth0 tx off >/dev/null + check_command_and_run_anything ethtool ip netns exec $NETNS ethtool -K eth0 tx off >/dev/null && + ip netns exec $NETNS ip link set $CONTAINER_IFNAME up } attach() { @@ -237,9 +237,9 @@ attach() { fi if ! connect_container_to_bridge || + ! check_command_and_run_anything ethtool ip netns exec $NETNS ethtool -K $CONTAINER_IFNAME tx off >/dev/null || ! ip netns exec $NETNS ip addr add $1 dev $CONTAINER_IFNAME || - ! ip netns exec $NETNS ip link set $CONTAINER_IFNAME up || - ! check_command_and_run_anything ethtool ip netns exec $NETNS ethtool -K $CONTAINER_IFNAME tx off >/dev/null ; then + ! ip netns exec $NETNS ip link set $CONTAINER_IFNAME up ; then return 1 fi