From 72b481855f28cd05ced9f8f5e4734f8ef08de244 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Tue, 10 Dec 2019 16:50:23 -0500 Subject: [PATCH] Setup - add jq and fix eval calculation of failure --- salt/common/init.sls | 1 + setup/so-setup.sh | 26 ++++++-------------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/salt/common/init.sls b/salt/common/init.sls index 505289bc0..0004bbc7e 100644 --- a/salt/common/init.sls +++ b/salt/common/init.sls @@ -38,6 +38,7 @@ sensorpkgs: - pkgs: - docker-ce - wget + - jq {% if grains['os'] != 'CentOS' %} - python-docker - python-m2crypto diff --git a/setup/so-setup.sh b/setup/so-setup.sh index f11a2d438..f2e48314c 100644 --- a/setup/so-setup.sh +++ b/setup/so-setup.sh @@ -644,30 +644,16 @@ if (whiptail_you_sure) ; then salt-call state.highstate >> $SETUPLOG 2>&1 } |whiptail --title "Hybrid Hunter Install" --gauge "Please wait while installing" 6 60 0 GOODSETUP=$(tail -10 $SETUPLOG | grep Failed | awk '{ print $2}') - if [ $OS == 'centos' ]; then - if [[ $GOODSETUP == '1' ]]; then - whiptail_setup_complete - if [[ $THEHIVE == '1' ]]; then - check_hive_init_then_reboot - else - shutdown -r now - fi + if [[ $GOODSETUP == '0' ]]; then + whiptail_setup_complete + if [[ $THEHIVE == '1' ]]; then + check_hive_init_then_reboot else - whiptail_setup_failed shutdown -r now fi else - if [[ $GOODSETUP == '0' ]]; then - whiptail_setup_complete - if [[ $THEHIVE == '1' ]]; then - check_hive_init_then_reboot - else - shutdown -r now - fi - else - whiptail_setup_failed - shutdown -r now - fi + whiptail_setup_failed + shutdown -r now fi fi