From 87b8c4698846f84e4bc283efc7ec49243ce8a904 Mon Sep 17 00:00:00 2001 From: "Ramón M. Gómez" Date: Thu, 1 Jul 2021 17:19:00 +0200 Subject: #1048: Installer detects container network interface as "eth0@ifNN". --- installer/opengnsys_installer.sh | 2 +- installer/opengnsys_update.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 972ea71a..558db304 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -894,7 +894,7 @@ function getNetworkSettings() local dev="" echoAndLog "${FUNCNAME}(): Detecting network parameters." - DEVICE=( $(ip -o link show up | awk '!/loopback/ {sub(/:.*/,"",$2); print $2}') ) + DEVICE=( $(ip -o link show up | awk '!/loopback/ {sub(/[:@].*/,"",$2); print $2}') ) if [ -z "$DEVICE" ]; then errorAndLog "${FUNCNAME}(): Network devices not detected." exit 1 diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh index 3a21072d..2214137e 100755 --- a/installer/opengnsys_update.sh +++ b/installer/opengnsys_update.sh @@ -565,7 +565,7 @@ function getNetworkSettings() local dev SERVERIP="$ServidorAdm" - DEVICES="$(ip -o link show up | awk '!/loopback/ {sub(/:.*/,"",$2); print $2}')" + 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); exit;}') done -- cgit v1.2.3-18-g5258