diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2018-08-22 10:12:29 +0200 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2018-08-22 10:12:29 +0200 |
commit | 9e64d82477d5852a184649dcd038e5af1333913d (patch) | |
tree | e73868eaae197d83940a91aabc1d7b807e102429 /installer/opengnsys_installer.sh | |
parent | 046004d9329b96336895db3572f9b26651d74a55 (diff) |
#869: Adaptación de paquetes en Ubuntu 18.04 y evitar redundancias al detectar parámetros de red.
Diffstat (limited to 'installer/opengnsys_installer.sh')
-rwxr-xr-x | installer/opengnsys_installer.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index c5375050..ccd4de0e 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -306,6 +306,8 @@ case "$OSDISTRIB" in fi # Adaptar dependencias para libmysqlclient. [ -z "$(apt-cache pkgnames libmysqlclient-dev)" ] && [ -n "$(apt-cache pkgnames libmysqlclient15)" ] && DEPENDENCIES=( ${DEPENDENCIES[@]//libmysqlclient-dev/libmysqlclient15} ) + # Paquete correcto para realpath. + [ -z "$(apt-cache pkgnames realpath)" ] && DEPENDENCIES=( ${DEPENDENCIES[@]//realpath/coreutils} ) ;; centos) # Postconfiguación personalizada para CentOS. # Configuración para PHP 7. @@ -876,8 +878,8 @@ function getNetworkSettings() if [ -n "${SERVERIP[i]}" ]; then NETMASK[i]=$( cidr2mask $(ip -o addr show dev "$dev" | awk '$3~/inet$/ {sub (/.*\//, "", $4); print ($4)}') ) NETBROAD[i]=$(ip -o addr show dev "$dev" | awk '$3~/inet$/ {print ($6)}') - NETIP[i]=$(ip route | awk -v d="$dev" '$3==d && /src/ {sub (/\/.*/,""); print $1}') - ROUTERIP[i]=$(ip route | awk -v d="$dev" '$1=="default" && $5==d {print $3}') + NETIP[i]=$(ip route list proto kernel | awk -v d="$dev" '$3==d && /src/ {sub (/\/.*/,""); print $1}') + ROUTERIP[i]=$(ip route list default | awk -v d="$dev" '$5==d {print $3}') DEFAULTDEV=${DEFAULTDEV:-"$dev"} fi let i++ |