summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2014-05-05 09:25:30 +0000
committerramon <ramongomez@us.es>2014-05-05 09:25:30 +0000
commit225e859d7cfde65af00818bb6f7c08668dacba09 (patch)
tree5b96a4a0ba816d3fca46f1bbf147bfa7aa66e5e6 /installer
parent44f65822d1ac25e88d9508f7359465590c47e40d (diff)
#616: Instalador soporta también el comando {{{curl}}} para comprobar conexión de red (compatible con instalación normal de Fedora 20).
git-svn-id: https://opengnsys.es/svn/branches/version1.0@4261 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/opengnsys_installer.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index ac9d5b5a..5575be98 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -742,7 +742,14 @@ function checkNetworkConnection()
echoAndLog "${FUNCNAME}(): Checking OpenGnSys server conectivity."
OPENGNSYS_SERVER=${OPENGNSYS_SERVER:-"www.opengnsys.es"}
- wget --spider -q $OPENGNSYS_SERVER
+ if which wget &>/dev/null; then
+ wget --spider -q $OPENGNSYS_SERVER
+ elif which curl &>/dev/null; then
+ curl --connect-timeout 10 -s $OPENGNSYS_SERVER -o /dev/null
+ else
+ echoAndLog "${FUNCNAME}(): Cannot execute \"wget\" nor \"curl\"."
+ return 1
+ fi
}
# Obtener los parámetros de red de la interfaz por defecto.