From 466fd79c66cea40d97490b8c120c1fe5e2ace2a8 Mon Sep 17 00:00:00 2001 From: Mcat12 Date: Sat, 27 Apr 2019 12:39:45 -0700 Subject: [PATCH] Fix getting IP address in the presence of similar subnets Change was suggested by @computergeek125 in #2387 Signed-off-by: Mcat12 --- automated install/basic-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index c915df33..ed5d5f3c 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -525,7 +525,7 @@ find_IPv4_information() { fi # Append the CIDR notation to the IP address, if valid_ip fails this should return 127.0.0.1/8 - IPV4_ADDRESS=$(ip -oneline -family inet address show | grep "${IPv4bare}" | awk '{print $4}' | awk 'END {print}') + IPV4_ADDRESS=$(ip -oneline -family inet address show | grep "${IPv4bare}/" | awk '{print $4}' | awk 'END {print}') } # Get available interfaces that are UP