From ebb59ce72977799196a2eaeda3668add17b767e1 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Mon, 8 Apr 2019 19:31:16 -0400 Subject: [PATCH] Setup - Make sure install completes properly --- so-setup-network.sh | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/so-setup-network.sh b/so-setup-network.sh index 3aa252d62..c6ae9bf2d 100644 --- a/so-setup-network.sh +++ b/so-setup-network.sh @@ -1492,6 +1492,14 @@ whiptail_setup_complete() { } +whiptail_setup_failed() { + + whiptail --title "Security Onion Setup" --msgbox "Install had a problem. Please see /root/sosetup.log for details" 8 78 + install_cleanup + exit + +} + whiptail_shard_count() { SHARDCOUNT=$(whiptail --title "Security Onion Setup" --inputbox \ @@ -1879,9 +1887,21 @@ if (whiptail_you_sure); then checkin_at_boot >>~/sosetup.log 2>&1 echo -e "XXX\n99\nVerifying Setup... \nXXX" salt-call state.highstate >>~/sosetup.log 2>&1 - + } |whiptail --title "Hybrid Hunter Install" --gauge "Please wait while installing" 6 60 0 - whiptail_setup_complete + GOODSETUP=$(tail -10 sosetup.log | grep Failed | awk '{ print $2}') + if [ $OS == 'centos' ]; then + if [ $GOODSETUP == 1 ]; then + whiptail_setup_complete + else + whiptail_setup_failed + fi + else + if [ $GOODSETUP == 0 ]; then + whiptail_setup_complete + else + whiptail_setup_failed + fi fi ###################