From 86052540d9d8dfd9931c654f75cce96491dfad5a Mon Sep 17 00:00:00 2001 From: Dan Schaper Date: Thu, 19 Jan 2017 13:50:42 -0800 Subject: [PATCH] Add back CIDR notation for non-natural blocks. Includes multi-address configs. Signed-off-by: Dan Schaper --- automated install/basic-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 6448aa0f..229cc2e4 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -173,7 +173,8 @@ find_IPv4_information() { # Find IP used to route to outside world route=$(ip route get 8.8.8.8) IPv4dev=$(awk '{for (i=1; i<=NF; i++) if ($i~/dev/) print $(i+1)}' <<< "${route}") - IPV4_ADDRESS=$(awk '{print $7}' <<< "${route}") + IPv4bare=$(awk '{print $7}' <<< "${route}") + IPV4_ADDRESS=$(ip -o -f inet addr show | grep "${IPv4bare}" | awk '{print $4}' | awk 'END {print}') IPv4gw=$(awk '{print $3}' <<< "${route}") }