From e251bfe8072a896beccedc7cb692879dd6fcc015 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 15 Aug 2017 13:46:26 +0000 Subject: [PATCH] Move use of command-line params to after we know them --- prog/weaver/main.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/prog/weaver/main.go b/prog/weaver/main.go index 947fd1a8..09d61994 100644 --- a/prog/weaver/main.go +++ b/prog/weaver/main.go @@ -211,10 +211,6 @@ func main() { mflag.StringVar(&pluginConfig.MeshSocket, []string{"-plugin-mesh-socket"}, "/run/docker/plugins/weavemesh.sock", "plugin socket on which to listen in mesh mode") proxyConfig := newProxyConfig(version, defaultDockerHost) - if bridgeConfig.AWSVPC { - proxyConfig.NoMulticastRoute = true - proxyConfig.KeepTXOn = true - } // crude way of detecting that we probably have been started in a // container, with `weave launch` --> suppress misleading paths in @@ -231,6 +227,11 @@ func main() { os.Exit(0) } + if bridgeConfig.AWSVPC { + proxyConfig.NoMulticastRoute = true + proxyConfig.KeepTXOn = true + } + peers = mflag.Args() if resume && len(peers) > 0 { Log.Fatalf("You must not specify an initial peer list in conjunction with --resume")