From 02920b5ac9f26eb612f454ea17ef3ae467c9aa30 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Thu, 18 May 2023 13:25:12 -0400 Subject: [PATCH] confirm manager ip when found in setup --- setup/so-functions | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index e5ec16e4a..d9322c171 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -49,8 +49,7 @@ add_admin_user() { } add_mngr_ip_to_hosts() { - info "Adding $MSRV to /etc/hosts with IP: $MSRVIP" - whiptail_manager_ip $MSRVIP + info "Adding $MSRV to /etc/hosts with IP: $MSRVIP" echo "$MSRVIP $MSRV" >> /etc/hosts } @@ -400,6 +399,11 @@ collect_mngr_hostname() { done else MSRVIP=$(getent hosts "$MSRV" | awk 'NR==1{print $1}') + whiptail_manager_ip "$MSRVIP" + while ! valid_ip4 "$MSRVIP" || [[ $MSRVIP == "$MAINIP" || $MSRVIP == "127.0.0.1" ]]; do + whiptail_invalid_input + whiptail_manager_ip "$MSRVIP" + done fi }