diff options
author | ramon <ramongomez@us.es> | 2012-01-18 18:04:40 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2012-01-18 18:04:40 +0000 |
commit | 6561f32622e5cfeeb68707f32e30010e5aa42f72 (patch) | |
tree | 65f4ca34569f5b0c175c8d35c1b0c96b50ae258b /installer/opengnsys_update.sh | |
parent | e14a80ac9116e415ce0c7fa3eea4c6a8c6674c2d (diff) |
Versión 1.0.2a, #000478, #000410: Actualizador de 1.0.2 a 1.0.2a corrige error de IP vacía en servidores con varias interfaces de red.
git-svn-id: https://opengnsys.es/svn/trunk@2444 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'installer/opengnsys_update.sh')
-rwxr-xr-x | installer/opengnsys_update.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index ad376290..787d6710 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -259,6 +259,22 @@ function checkNetworkConnection() wget --spider -q $OPENGNSYS_SERVER } +# Obtener los parámetros de red del servidor. +function getNetworkSettings() +{ + # Variables globales definidas: + # - SERVERIP: IP local de la interfaz por defecto. + + local DEVICES + local dev + + echoAndLog "${FUNCNAME}(): Detecting network parameters." + DEVICES="$(ip -o link show up | awk '!/loopback/ {sub(/:.*/,"",$2); print $2}')" + for dev in $DEVICES; do + [ -z "$SERVERIP" ] && SERVERIP=$(ip -o addr show dev $dev | awk '$3~/inet$/ {sub (/\/.*/, ""); print ($4)}') + done +} + ##################################################################### ####### Funciones específicas de la instalación de Opengnsys @@ -625,6 +641,7 @@ if [ $? -ne 0 ]; then errorAndLog " - Server is temporally down, try agian later." exit 1 fi +getNetworkSettings # Comprobar auto-actualización del programa. if [ "$PROGRAMDIR" != "$INSTALL_TARGET/bin" ]; then |