only check for command / print usage at remote

This is desirable since we want to do as little as possible locally,
and not duplicate any checks.
This commit is contained in:
Matthias Radestock committed 2015-04-19 13:19:06 +01:00
1 parent 7752d6b102
commit fbf7612726
1 file changed
+4 -6
+4 -6
View File
@@ -64,8 +64,6 @@ exec_remote() {
$EXEC_IMAGE --local "$@" $EXEC_IMAGE --local "$@"
} }
[ $# -gt 0 ] || usage
# "run" is a special case because we want to use docker directly, # "run" is a special case because we want to use docker directly,
# rather than the docker in $EXEC_IMAGE remotely. That's because we # rather than the docker in $EXEC_IMAGE remotely. That's because we
# are passing arbitrary arguments on to docker run, and we can't rely # are passing arbitrary arguments on to docker run, and we can't rely
@@ -87,10 +85,6 @@ PORT=${WEAVE_PORT:-6783}
HTTP_PORT=6784 HTTP_PORT=6784
DNS_HTTP_PORT=6785 DNS_HTTP_PORT=6785
COMMAND=$1
shift 1
###################################################################### ######################################################################
# general helpers; independent of docker and weave # general helpers; independent of docker and weave
###################################################################### ######################################################################
@@ -608,6 +602,10 @@ DOCKER_VERSION_MAJOR=$(echo "$DOCKER_VERSION" | cut -d. -f 1)
DOCKER_VERSION_MINOR=$(echo "$DOCKER_VERSION" | cut -d. -f 2) DOCKER_VERSION_MINOR=$(echo "$DOCKER_VERSION" | cut -d. -f 2)
DOCKER_VERSION_PATCH=$(echo "$DOCKER_VERSION" | cut -d. -f 3) DOCKER_VERSION_PATCH=$(echo "$DOCKER_VERSION" | cut -d. -f 3)
[ $# -gt 0 ] || usage
COMMAND=$1
shift 1
case "$COMMAND" in case "$COMMAND" in
setup) setup)
for img in $IMAGE $DNS_IMAGE $EXEC_IMAGE ; do for img in $IMAGE $DNS_IMAGE $EXEC_IMAGE ; do