Add additional checks for manager hostname + ip

Check for current hostname, ip, and localhost (ip + string) when setting the manager ip and hostname
This commit is contained in:
William Wernert
2021-11-05 15:56:08 -04:00
parent 988932293f
commit 246d41c552

View File

@@ -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