From 2549628263449a2be3bec4576a215f7deab061e9 Mon Sep 17 00:00:00 2001 From: Christoph Date: Sun, 19 May 2019 02:50:54 +0200 Subject: [PATCH] netconfig.sh: Fix error in determin ipv4 address. --- netconfig.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netconfig.sh b/netconfig.sh index f72c212..39844c1 100755 --- a/netconfig.sh +++ b/netconfig.sh @@ -294,7 +294,7 @@ while ! $configured && [ $_try_number -lt $max_attempts ] ; do ## - Is the device present and has local Address ? ## - - local_gw_address="$(ip addr show $inet_device 2> /dev/null | grep inet | awk '{print$2}' | cut -d '/' -f1)" + local_gw_address="$(ip addr show $inet_device 2> /dev/null | grep -E "\s+inet\s+" | awk '{print$2}' | cut -d '/' -f1)" if [ -z $local_gw_address ]; then if $LOGGING_CONSOLE ; then echo -e "\n\t[ Error ]: Connection at interface \"$inet_device\" seems to be down !"