netconfig.sh: Fix error in determin ipv4 address.

This commit is contained in:
Christoph 2019-05-19 02:50:54 +02:00
parent 0e55b1a6c5
commit 2549628263

View File

@ -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 !"