From 6ae91c2ff08d763e98284207d8c6c178252e7b2c Mon Sep 17 00:00:00 2001 From: William Wernert Date: Mon, 4 May 2020 09:34:36 -0400 Subject: [PATCH] [feat] Use getent instead of hosts in case the hostsfile has already been updated --- setup/so-whiptail | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup/so-whiptail b/setup/so-whiptail index d66e3197d..7511400b0 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -519,10 +519,7 @@ whiptail_management_server() { local exitstatus=$? whiptail_check_exitstatus $exitstatus - # See if it resolves. Otherwise prompt to add to host file - TESTHOST=$(host "$MSRV") - - if [[ $TESTHOST = *"not found"* ]] || [ -z "$TESTHOST" ] || [[ $TESTHOST = *"connection timed out"* ]] || [[ "$TESTHOST" = '' ]]; then + if ! getent hosts "$MSRV"; then add_master_hostfile fi