make weave launch args insensitive to order

Fixes #816.
This commit is contained in:
Matthias Radestock committed 2015-06-08 12:41:26 +01:00
1 parent 8a5725fa74
commit 3f274d02ce
1 file changed
+5 -2
+5 -2
View File
@@ -864,7 +864,8 @@ case "$COMMAND" in
shift 1 shift 1
fi fi
CONTAINER_PORT=$PORT CONTAINER_PORT=$PORT
while true ; do ARGS=""
while [ $# -gt 0 ] ; do
case "$1" in case "$1" in
-password) -password)
[ $# -gt 1 ] || usage [ $# -gt 1 ] || usage
@@ -884,10 +885,12 @@ case "$COMMAND" in
shift 2 shift 2
;; ;;
*) *)
break ARGS="$ARGS '$(echo "$1" | sed "s|'|'\"'\"'|g")'"
shift
;; ;;
esac esac
done done
eval "set -- $ARGS"
# Set WEAVE_DOCKER_ARGS in the environment in order to supply # Set WEAVE_DOCKER_ARGS in the environment in order to supply
# additional parameters, such as resource limits, to docker # additional parameters, such as resource limits, to docker
# when launching the weave container. # when launching the weave container.