From 246d41c55270292454f7121914cbcbdeb6f904d1 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Fri, 5 Nov 2021 15:56:08 -0400 Subject: [PATCH] Add additional checks for manager hostname + ip Check for current hostname, ip, and localhost (ip + string) when setting the manager ip and hostname --- setup/so-functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/so-functions b/setup/so-functions index 6d46b4bb4..410cc5970 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -470,7 +470,7 @@ collect_int_ip_mask() { collect_mngr_hostname() { whiptail_management_server - while ! valid_hostname "$MSRV"; do + while ! valid_hostname "$MSRV" || [[ $MSRV == "$HOSTNAME" || $MSRVIP == "localhost" ]]; do whiptail_invalid_hostname whiptail_management_server "$MSRV" done @@ -478,7 +478,7 @@ collect_mngr_hostname() { if ! getent hosts "$MSRV"; then whiptail_manager_ip - while ! valid_ip4 "$MSRVIP"; do + while ! valid_ip4 "$MSRVIP" || [[ $MSRVIP == "$MAINIP" || $MSRVIP == "127.0.0.1" ]]; do whiptail_invalid_input whiptail_manager_ip "$MSRVIP" done