From 51650147ef1b398d8841512531f08a036bc54d0d Mon Sep 17 00:00:00 2001 From: William Wernert Date: Wed, 9 Dec 2020 09:59:44 -0500 Subject: [PATCH] [fix] Only show network init message if valid --- setup/so-setup | 4 +++- setup/so-whiptail | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/setup/so-setup b/setup/so-setup index 5109365da..fe11d5361 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -257,7 +257,9 @@ if ! [ -f /root/install_opt ]; then whiptail_management_server fi - whiptail_management_interface_setup + if [[ $is_minion || $is_iso ]]; then + whiptail_management_interface_setup + fi if [[ "$setup_type" == 'iso' ]]; then # Init networking so rest of install works diff --git a/setup/so-whiptail b/setup/so-whiptail index 68734c1c5..a37340764 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -769,14 +769,23 @@ whiptail_management_interface_setup() { [ -n "$TESTING" ] && return local minion_msg + local msg - if [[ $is_minion || $is_import ]]; then - minion_msg=" and copy the ssh key for soremote to the manager" + if [[ $is_minion ]]; then + minion_msg="copy the ssh key for soremote to the manager" else minion_msg="" fi - whiptail --title "Security Onion Setup" --yesno "Setup will now initialize networking$minion_msg. Select YES to continue or NO to cancel." 8 75 + if [[ $is_iso ]]; then + if [[ $minion_msg != "" ]]; then + msg="initialize networking and $minion_msg" + else + msg="initialize networking" + fi + fi + + whiptail --title "Security Onion Setup" --yesno "Setup will now $msg. Select YES to continue or NO to cancel." 8 75 local exitstatus=$? whiptail_check_exitstatus $exitstatus }