[feat] Use getent instead of hosts in case the hostsfile has already been updated

This commit is contained in:
William Wernert
2020-05-04 09:34:36 -04:00
parent 299709108f
commit 6ae91c2ff0

View File

@@ -519,10 +519,7 @@ whiptail_management_server() {
local exitstatus=$? local exitstatus=$?
whiptail_check_exitstatus $exitstatus whiptail_check_exitstatus $exitstatus
# See if it resolves. Otherwise prompt to add to host file if ! getent hosts "$MSRV"; then
TESTHOST=$(host "$MSRV")
if [[ $TESTHOST = *"not found"* ]] || [ -z "$TESTHOST" ] || [[ $TESTHOST = *"connection timed out"* ]] || [[ "$TESTHOST" = '' ]]; then
add_master_hostfile add_master_hostfile
fi fi