summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIrina Gómez <irinagomez@us.es>2021-03-04 14:48:14 +0100
committerIrina Gómez <irinagomez@us.es>2021-03-04 14:48:14 +0100
commitc3648b9967e5b10dcdb8db934ab88060702ad207 (patch)
tree6fb9bebe88b016c643a3a9edf1862d0ec103ac81
parent1736503f6946883b23a72a739939a94ddf0e042b (diff)
#1026 The installation script displays information message only when distribution is different than advised.
-rwxr-xr-xinstaller/opengnsys_installer.sh26
1 files changed, 20 insertions, 6 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh
index cab94c9e..ed892df0 100755
--- a/installer/opengnsys_installer.sh
+++ b/installer/opengnsys_installer.sh
@@ -43,6 +43,24 @@ function enterPassword ()
done
}
+# Si la distribución no es la recomendada mostramos mensaje informativo.
+function checkDistribution()
+{
+ local ADVISED VERSION
+
+ ADVISED="18"
+ [ -r /etc/os-release ] && eval $(grep VERSION /etc/os-release)
+
+ [[ "$VERSION" == "$ADVISED."* ]] && return
+
+ echoAndLog "The OpenGnsys version 1.2.0 installation was tested with full functionality on Ubuntu 18.04 with PHP 7.2."
+ echo -n "Do you want to continue? [y/N]: "
+ read -r GO_ON
+ if [ "${GO_ON^^}" != "Y" ]; then
+ echoAndLog "We left the installation." && exit
+ fi
+}
+
# Recoge los datos de configuración introducidos por el usuario.
function userData ()
{
@@ -1657,12 +1675,8 @@ if cat $INSTALL_TARGET/doc/VERSION.* &>/dev/null; then
exit 2
fi
-echoAndLog "The OpenGnsys version 1.2.0 installation was tested with full functionality on Ubuntu 18.04 with PHP 7.2."
-echo -n "Do you want to continue? [y/N]: "
-read -r GO_ON
-if [ "${GO_ON^^}" != "Y" ]; then
- echoAndLog "We left the installation." && exit
-fi
+# Si la distribución no es la recomendada mostramos mensaje informativo.
+checkDistribution
echoAndLog "OpenGnsys installation begins at $(date)"
# Introducir datos de configuración y establecer variables globales.