From 25b0934cda538008783947c02c2d1b4e1e9399f9 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Thu, 18 May 2023 13:06:20 -0400 Subject: [PATCH 1/3] confirm manager ip when found in setup --- setup/so-functions | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index 9dd1b7713..e5ec16e4a 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -49,8 +49,9 @@ add_admin_user() { } add_mngr_ip_to_hosts() { - info "Adding $MSRV to /etc/hosts with IP: $MSRVIP" - echo "$MSRVIP $MSRV" >> /etc/hosts + info "Adding $MSRV to /etc/hosts with IP: $MSRVIP" + whiptail_manager_ip $MSRVIP + echo "$MSRVIP $MSRV" >> /etc/hosts } add_socore_user_manager() { From 02920b5ac9f26eb612f454ea17ef3ae467c9aa30 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Thu, 18 May 2023 13:25:12 -0400 Subject: [PATCH 2/3] 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 } From bab2f7282c70acf5a1186657e0798cba73076a99 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Thu, 18 May 2023 13:27:48 -0400 Subject: [PATCH 3/3] fix spaciong --- setup/so-functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index d9322c171..09e219cfd 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -49,8 +49,8 @@ add_admin_user() { } add_mngr_ip_to_hosts() { - info "Adding $MSRV to /etc/hosts with IP: $MSRVIP" - echo "$MSRVIP $MSRV" >> /etc/hosts + info "Adding $MSRV to /etc/hosts with IP: $MSRVIP" + echo "$MSRVIP $MSRV" >> /etc/hosts } add_socore_user_manager() {