Skip whiptail during testing, echo error message to setup log

This commit is contained in:
William Wernert
2021-04-12 16:13:32 -04:00
parent 8cb4a75eb1
commit cc344d921a
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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 \