From c614e0a8805b87f4e5d00ea0e02607c334eacde2 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Wed, 27 May 2020 10:11:54 -0400 Subject: [PATCH 1/2] [feat] Add prompt about master needing internet access When package updates go through the master node, that master needs internet access. Therefore, prompt the user about this requirement. Resolves #146 --- setup/so-setup | 3 +++ setup/so-whiptail | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/setup/so-setup b/setup/so-setup index fdc69076b..c07cca70b 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -231,6 +231,9 @@ fi if [[ $is_distmaster || ( $is_sensor || $is_node ) && ! $is_eval ]]; then whiptail_master_updates + if [[ $setup_type == 'network' && $MASTERUPDATES == 1 ]]; then + whiptail_master_updates_warning + fi fi if [[ $is_minion ]]; then diff --git a/setup/so-whiptail b/setup/so-whiptail index 72455fc9e..31a0c05ec 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -1027,7 +1027,17 @@ whiptail_master_updates() { ;; esac +} +whiptail_master_updates_warning() { + [ -n "$TESTING" ] && return + + whiptail --title "Security Onion Setup"\ + --msgbox "Updating through the master node requires the master to have internet access, press ENTER to continue"\ + 8 75 + + local exitstatus=$? + whiptail_check_exitstatus $exitstatus } whiptail_node_updates() { From 9cc2614cc8d31ead8b608bfe6d8c87e9b47ec288 Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Wed, 27 May 2020 11:47:18 -0400 Subject: [PATCH 2/2] Automated setup will now output progress data to sosetup.log --- setup/so-functions | 4 +++- setup/so-setup | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/setup/so-functions b/setup/so-functions index 612b0147b..f6abdb047 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -998,7 +998,9 @@ parse_options() { export {https,ftp,rsync,all}_proxy="$http_proxy" ;; *) - echo "Invalid option" + if [[ $1 = --* ]]; then + echo "Invalid option" + fi esac } diff --git a/setup/so-setup b/setup/so-setup index 4e004b425..9ddb35a0a 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -33,6 +33,8 @@ echo "---- Starting setup at $(date -u) ----" >> $setup_log 2>&1 function progress() { if [ $automated == no ]; then whiptail --title "Security Onion Install" --gauge 'Please wait while installing' 6 60 0 + else + cat >> $setup_log 2>&1 fi }