From bdb0efa1535afa06ec45d10e68e95e1f0b6f11d2 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Mon, 4 Nov 2019 11:50:39 -0500 Subject: [PATCH] Setup Script - Issue 91 --- so-setup-network.sh | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/so-setup-network.sh b/so-setup-network.sh index 47aa6c42f..cfc0912fb 100644 --- a/so-setup-network.sh +++ b/so-setup-network.sh @@ -56,9 +56,9 @@ add_master_hostfile() { "Enter your Master Server IP Address" 10 60 X.X.X.X 3>&1 1>&2 2>&3) # Add the master to the host file if it doesn't resolve - if ! grep -q $MSRVIP /etc/hosts; then - echo "$MSRVIP $MSRV" >> /etc/hosts - fi + #if ! grep -q $MSRVIP /etc/hosts; then + # echo "$MSRVIP $MSRV" >> /etc/hosts + #fi } add_socore_user_master() { @@ -968,7 +968,9 @@ set_hostname() { echo $HOSTNAME > /etc/hostname if [ $INSTALLTYPE != 'MASTERONLY' ] || [ $INSTALLTYPE != 'EVALMODE' ]; then if [[ $TESTHOST = *"not found"* ]]; then - add_master_hostfile + if ! grep -q $MSRVIP /etc/hosts; then + echo "$MSRVIP $MSRV" >> /etc/hosts + fi fi fi @@ -1316,9 +1318,9 @@ whiptail_management_server() { # See if it resolves. Otherwise prompt to add to host file TESTHOST=$(host $MSRV) - #if [[ $TESTHOST = *"not found"* ]]; then - # add_master_hostfile - #fi + if [[ $TESTHOST = *"not found"* ]]; then + add_master_hostfile + fi local exitstatus=$?