From 56742dbd725f91f3e6f373182cb0196c9aa02356 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 18 Oct 2018 13:08:44 +0200 Subject: #872: Solving a potential problem with downloads in some Vagrant files. --- installer/vagrant/Vagrantfile-devel-vbox | 17 +++++++++++------ installer/vagrant/Vagrantfile-prod-vbox | 17 +++++++++++------ 2 files changed, 22 insertions(+), 12 deletions(-) (limited to 'installer/vagrant') diff --git a/installer/vagrant/Vagrantfile-devel-vbox b/installer/vagrant/Vagrantfile-devel-vbox index 00d7dab6..49bc655e 100644 --- a/installer/vagrant/Vagrantfile-devel-vbox +++ b/installer/vagrant/Vagrantfile-devel-vbox @@ -38,7 +38,12 @@ if [ -z "$(blkid /dev/mapper/og-images | grep ext4)" ]; then mount -a fi # Install OpenGnsys and change server address. -curl -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh | bash || exit $? +if which curl &>/dev/null; then + DOWNLOAD="curl -s" +elif which wget &>/dev/null; then + DOWNLOAD="wget -q -O -" +fi +$DOWNLOAD -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/devel/installer/opengnsys_installer.sh | bash || exit $? mv /opt/opengnsys/log/bash.log /opt/opengnsys/log/opengnsys_installer.log echo y | /opt/opengnsys/bin/setserveraddr enp0s8 # Insert DHCP data. @@ -94,12 +99,12 @@ OGAGENTPKG = "ogagent_1.1.0_all.deb" MODELSCRIPT = </dev/null; then + DOWNLOAD="curl -s" +elif which wget &>/dev/null; then + DOWNLOAD="wget -q -O -" +fi +$DOWNLOAD -s https://raw.githubusercontent.com/opengnsys/OpenGnsys/master/installer/opengnsys_installer.sh | bash || exit $? mv /opt/opengnsys/log/bash.log /opt/opengnsys/log/opengnsys_installer.log echo y | /opt/opengnsys/bin/setserveraddr enp0s8 # Insert DHCP data. @@ -73,12 +78,12 @@ OGAGENTPKG = "ogagent_1.1.0_all.deb" MODELSCRIPT = <