Move use of command-line params to after we know them
This commit is contained in:
1 parent
eb88893312
commit
e251bfe807
1 file changed
+5
-4
+5
-4
@@ -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")
|
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)
|
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
|
// crude way of detecting that we probably have been started in a
|
||||||
// container, with `weave launch` --> suppress misleading paths in
|
// container, with `weave launch` --> suppress misleading paths in
|
||||||
@@ -231,6 +227,11 @@ func main() {
|
|||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if bridgeConfig.AWSVPC {
|
||||||
|
proxyConfig.NoMulticastRoute = true
|
||||||
|
proxyConfig.KeepTXOn = true
|
||||||
|
}
|
||||||
|
|
||||||
peers = mflag.Args()
|
peers = mflag.Args()
|
||||||
if resume && len(peers) > 0 {
|
if resume && len(peers) > 0 {
|
||||||
Log.Fatalf("You must not specify an initial peer list in conjunction with --resume")
|
Log.Fatalf("You must not specify an initial peer list in conjunction with --resume")
|
||||||
|
|||||||
Reference in new issue
Block a user