leave networking alone on 'weave launch' unless we start container
This commit is contained in:
1 parent
4c93991651
commit
f10c460f48
1 file changed
+9
-9
+9
-9
@@ -117,15 +117,6 @@ case "$COMMAND" in
|
||||
[ $# -gt 0 ] || usage
|
||||
IPADDR=$1
|
||||
shift 1
|
||||
create_bridge
|
||||
setup_masquerading $IPADDR
|
||||
# We set the router name to the bridge mac since that is
|
||||
# stable across re-creations of the containers.
|
||||
#
|
||||
# TODO use the mac of one of the physical host interfaces
|
||||
# (eth0, wlan0, etc) so the name becomes stable across host
|
||||
# restarts.
|
||||
MACADDR=`cat /sys/class/net/$BRIDGE/address`
|
||||
case $(docker inspect --format '{{ .State.Running }} {{ .Config.Image }}' weave 2>/dev/null) in
|
||||
"true zettio/weave")
|
||||
echo "Weave is already running." >&2
|
||||
@@ -143,6 +134,15 @@ case "$COMMAND" in
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
create_bridge
|
||||
setup_masquerading $IPADDR
|
||||
# We set the router name to the bridge mac since that is
|
||||
# stable across re-creations of the containers.
|
||||
#
|
||||
# TODO use the mac of one of the physical host interfaces
|
||||
# (eth0, wlan0, etc) so the name becomes stable across host
|
||||
# restarts.
|
||||
MACADDR=`cat /sys/class/net/$BRIDGE/address`
|
||||
CONTAINER=$(docker run --privileged -d --name=weave -p 6783:6783/tcp -p 6783:6783/udp $WEAVE_DOCKER_ARGS zettio/weave -name $MACADDR "$@")
|
||||
configure_container_networking $CONTAINER $IPADDR eth0
|
||||
echo $CONTAINER
|
||||
|
||||
Reference in new issue
Block a user