diff --git a/weaver/weave b/weaver/weave index 108d2003..f2aaa24f 100755 --- a/weaver/weave +++ b/weaver/weave @@ -29,6 +29,7 @@ command_exists () { [ $# -gt 0 ] || usage +IMAGE=zettio/weave BRIDGE=weave CONTAINER_IFNAME=ethwe MTU=65535 @@ -229,11 +230,11 @@ case "$COMMAND" in IPADDR=$1 shift 1 case $(docker inspect --format '{{ .State.Running }} {{ .Config.Image }}' weave 2>/dev/null) in - "true zettio/weave") + "true $IMAGE") echo "Weave is already running." >&2 exit 1 ;; - "false zettio/weave") + "false $IMAGE") docker rm weave >/dev/null ;; true*) @@ -255,7 +256,7 @@ case "$COMMAND" in # (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 "$@") + CONTAINER=$(docker run --privileged -d --name=weave -p 6783:6783/tcp -p 6783:6783/udp $WEAVE_DOCKER_ARGS $IMAGE -name $MACADDR "$@") with_container_netns attach $CONTAINER $IPADDR eth0 echo $CONTAINER ;; @@ -280,8 +281,8 @@ case "$COMMAND" in version) # Try the running container first; if no luck try the image if ! DOCKERIMAGE=$(docker inspect --format='{{ .Image }}' weave 2>/dev/null) ; then - if ! DOCKERIMAGE=$(docker inspect --format='{{ .Id }}' zettio/weave 2>/dev/null) ; then - echo "Unable to find zettio/weave image." >&2 + if ! DOCKERIMAGE=$(docker inspect --format='{{ .Id }}' $IMAGE 2>/dev/null) ; then + echo "Unable to find $IMAGE image." >&2 exit 1 fi fi