From cc344d921ac481d17e5d2e6f4179215a46e1ca9e Mon Sep 17 00:00:00 2001 From: William Wernert Date: Mon, 12 Apr 2021 16:13:32 -0400 Subject: [PATCH] Skip whiptail during testing, echo error message to setup log --- setup/so-setup | 1 + setup/so-whiptail | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/setup/so-setup b/setup/so-setup index bac2fcdfd..ad210048a 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -575,6 +575,7 @@ if [[ $is_manager || $is_import ]]; then collect_so_allow; fi set_redirect >> $setup_log 2>&1 if [[ $is_minion ]] && ! check_manager_state; then + echo "Manager was not in a good state" >> "$setup_log" 2>&1 whiptail_manager_error fi diff --git a/setup/so-whiptail b/setup/so-whiptail index 6ce2c214c..6f1cc6171 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -1146,6 +1146,9 @@ whiptail_manager_adv_service_zeeklogs() { } whiptail_manager_error() { + + [ -n "$TESTING" ] && return + local msg read -r -d '' msg <<- EOM Setup could not determine if the manager $MSRV is in a good state. @@ -1159,9 +1162,6 @@ whiptail_manager_error() { } whiptail_manager_updates() { - - [ -n "$TESTING" ] && return - local update_string update_string=$(whiptail --title "Security Onion Setup" --radiolist \ "How would you like to download OS package updates for your grid?" 20 75 4 \