From c3648b9967e5b10dcdb8db934ab88060702ad207 Mon Sep 17 00:00:00 2001 From: Irina Gómez Date: Thu, 4 Mar 2021 14:48:14 +0100 Subject: #1026 The installation script displays information message only when distribution is different than advised. --- installer/opengnsys_installer.sh | 26 ++++++++++++++++++++------ 1 file 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. -- cgit v1.2.3-18-g5258