we don't need to extract the -nickname option since when the same
option is specified more than once, the last value wins
This commit is contained in:
Matthias Radestock committed 2015-05-08 18:28:22 +01:00
1 parent 5a3ff111ef
commit 5472d868aa
1 file changed
+1 -7
+1 -7
View File
@@ -684,7 +684,6 @@ case "$COMMAND" in
echo "WARNING: $1 parameter ignored; 'weave launch' no longer takes a CIDR as the first parameter" >&2
shift 1
fi
NICKNAME=$(hostname)
CONTAINER_PORT=$PORT
while true; do
case "$1" in
@@ -694,11 +693,6 @@ case "$COMMAND" in
export WEAVE_PASSWORD
shift 2
;;
-nickname)
[ $# -gt 1 ] || usage
NICKNAME="$2"
shift 2
;;
-port)
[ $# -gt 1 ] || usage
CONTAINER_PORT="$2"
@@ -714,7 +708,7 @@ case "$COMMAND" in
# when launching the weave container.
CONTAINER=$(docker run --privileged -d --name=$CONTAINER_NAME \
-p $PORT:$CONTAINER_PORT/tcp -p $PORT:$CONTAINER_PORT/udp -e WEAVE_PASSWORD \
$WEAVE_DOCKER_ARGS $IMAGE -iface $CONTAINER_IFNAME -port $CONTAINER_PORT -name "$PEERNAME" -nickname "$NICKNAME" "$@")
$WEAVE_DOCKER_ARGS $IMAGE -iface $CONTAINER_IFNAME -port $CONTAINER_PORT -name "$PEERNAME" -nickname "$(hostname)" "$@")
with_container_netns $CONTAINER launch >/dev/null
wait_for_status $CONTAINER_NAME $HTTP_PORT
echo $CONTAINER