You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/10/31 17:08:51 UTC

[incubator-openwhisk] branch master updated: Fix tweak dockermachine (#2914)

This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk.git


The following commit(s) were added to refs/heads/master by this push:
     new 5cbff09  Fix tweak dockermachine (#2914)
5cbff09 is described below

commit 5cbff099165471fa8d06a5971810eb52673996c5
Author: James Dubee <jw...@us.ibm.com>
AuthorDate: Tue Oct 31 13:08:49 2017 -0400

    Fix tweak dockermachine (#2914)
---
 tools/macos/docker-machine/tweak-dockermachine.sh | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/tools/macos/docker-machine/tweak-dockermachine.sh b/tools/macos/docker-machine/tweak-dockermachine.sh
old mode 100644
new mode 100755
index 9eeef7e..c2cf98f
--- a/tools/macos/docker-machine/tweak-dockermachine.sh
+++ b/tools/macos/docker-machine/tweak-dockermachine.sh
@@ -12,14 +12,9 @@ docker-machine ssh $MACHINE_NAME "echo DOCKER_HOST=\'-H tcp://0.0.0.0:4243\' |su
 docker-machine ssh $MACHINE_NAME "echo EXTRA_ARGS=\'--userns-remap=default\' |sudo tee -a /var/lib/boot2docker/profile > /dev/null"
 docker-machine ssh $MACHINE_NAME "echo '#!/bin/sh
 /sbin/syslogd
-sudo ping -c 3 repo.tinycorelinux.net > /dev/null
-if [ \$? -ne 0 ]; then
-    sudo ping -c 3 ftp.gtlib.gatech.edu > /dev/null
-    if [ \$? -eq 0 ]; then
-        sudo echo \"ftp://ftp.gtlib.gatech.edu/pub/tinycore/\" > /opt/tcemirror
-    else
-        sudo echo \"http://ftp.nluug.nl/os/Linux/distr/tinycorelinux/\" > /opt/tcemirror        
-    fi
+STATUS=\$(curl -s -o /dev/null -w '%{http_code}' repo.tinycorelinux.net)
+if [ \$STATUS -ne 200 ]; then
+    sudo echo \"http://ftp.nluug.nl/os/Linux/distr/tinycorelinux/\" > /opt/tcemirror
 fi
 su - docker -c \"tce-load -wi python\"
 if ! [ -x /usr/local/bin/pip ]; then

-- 
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].