we only need the bridge address when launching weave

This commit is contained in:
Matthias Radestock committed 2014-08-29 16:16:16 +01:00
1 parent 180c142964
commit 2c88710d62
1 file changed
+7 -7
+7 -7
View File
@@ -39,15 +39,15 @@ shift 2
ip link set dev $BRIDGE up
}
# 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 "$COMMAND" in
launch)
# 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 "$@")
IFACE=eth0
;;