From 00f178197c01d3d80aee2b14bfbe418742bfcb6a Mon Sep 17 00:00:00 2001 From: William Wernert Date: Mon, 13 Jul 2020 14:34:11 -0400 Subject: [PATCH] [fix] Evaluate $success early to avoid checking against other output --- setup/so-setup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup/so-setup b/setup/so-setup index 2d2275f5f..31baf3deb 100755 --- a/setup/so-setup +++ b/setup/so-setup @@ -620,11 +620,13 @@ fi success=$(tail -10 $setup_log | grep Failed | awk '{ print $2}') +if [[ $success != 0 ]]; then SO_ERROR=1; fi # evaluate success first so it doesn't check against the output of so-allow + if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then IP=$ALLOW_CIDR so-allow -$ALLOW_ROLE >> $setup_log 2>&1 fi -if [[ $success != 0 || $SO_ERROR == 1 ]]; then +if [[ -n $SO_ERROR ]]; then SKIP_REBOOT=1 whiptail_setup_failed else