diff --git a/setup/so-functions b/setup/so-functions index ee9a25576..ace4c5a8a 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -467,7 +467,10 @@ detect_os() { fi # Install bind-utils so the host command exists - yum -y install bind-utils >> "$setup_log" 2>&1 + if ! command -v host > /dev/null 2>&1; then + echo "Installing required packages to run installer" + yum -y install bind-utils >> "$setup_log" 2>&1 + fi elif [ -f /etc/os-release ]; then @@ -481,11 +484,14 @@ detect_os() { exit 1 fi # Install network manager so we can do interface stuff - { - apt-get install -y network-manager; - systemctl enable NetworkManager; - systemctl start NetworkManager; - } >> "$setup_log" 2<&1 + if ! command -v nmcli > /dev/null 2>&1; then + echo "Installing required packages to run installer" + { + apt-get install -y network-manager; + systemctl enable NetworkManager; + systemctl start NetworkManager; + } >> "$setup_log" 2<&1 + fi else echo "We were unable to determine if you are using a supported OS." diff --git a/setup/so-whiptail b/setup/so-whiptail index 567193192..16ff4d572 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -515,7 +515,7 @@ whiptail_management_server() { # See if it resolves. Otherwise prompt to add to host file TESTHOST=$(host "$MSRV") - if [[ $TESTHOST = *"not found"* ]] || [ -z "$TESTHOST" ] || [[ $TESTHOST = *"connection timed out"* ]]; then + if [[ $TESTHOST = *"not found"* ]] || [ -z "$TESTHOST" ] || [[ $TESTHOST = *"connection timed out"* ]] || [[ "$TESTHOST" = '' ]]; then add_master_hostfile fi