From 328146799438427dbb9eb7c658580771b5974c70 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Mon, 20 Jul 2020 20:26:35 -0400 Subject: [PATCH] When running in automated mode, cat all piped in input to setup log --- setup/so-setup | 5 ----- setup/so-whiptail | 10 ++++++---- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/setup/so-setup b/setup/so-setup index 31f917b16..80d028662 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -633,11 +633,6 @@ if [[ -n $SO_ERROR ]]; then whiptail_setup_failed else echo "Successfully completed setup! Continuing with post-installation steps" >> $setup_log 2>&1 - echo "automated=$automated" >> $setup_log 2>&1 - echo "ALLOW_ROLE=$ALLOW_ROLE" >> $setup_log 2>&1 - echo "ALLOW_CIDR=$ALLOW_CIDR" >> $setup_log 2>&1 - echo "THEHIVE=$THEHIVE" >> $setup_log 2>&1 - { export percentage=95 # set to last percentage used in previous subshell if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then diff --git a/setup/so-whiptail b/setup/so-whiptail index f0f1fb7b5..faeb5f496 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -1098,11 +1098,13 @@ whiptail_so_allow() { whiptail_gauge_post_setup() { - [ -n "$TESTING" ] && return - - local msg=$1 + if [ -n "$TESTING" ] + cat >> $setup_log 2>&1 + else + local msg=$1 - whiptail --title "Security Onion Setup" --gauge "$msg" 6 60 96 + whiptail --title "Security Onion Setup" --gauge "$msg" 6 60 96 + fi } whiptail_strelka_rules() {