csantanapr closed pull request #2914: Fix Python download for 
tweak-dockermachine
URL: https://github.com/apache/incubator-openwhisk/pull/2914
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 9eeef7e9eb..c2cf98f782
--- 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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to