mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[fix] Evaluate $success early to avoid checking against other output
This commit is contained in:
@@ -620,11 +620,13 @@ fi
|
|||||||
|
|
||||||
success=$(tail -10 $setup_log | grep Failed | awk '{ print $2}')
|
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
|
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
|
||||||
IP=$ALLOW_CIDR so-allow -$ALLOW_ROLE >> $setup_log 2>&1
|
IP=$ALLOW_CIDR so-allow -$ALLOW_ROLE >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $success != 0 || $SO_ERROR == 1 ]]; then
|
if [[ -n $SO_ERROR ]]; then
|
||||||
SKIP_REBOOT=1
|
SKIP_REBOOT=1
|
||||||
whiptail_setup_failed
|
whiptail_setup_failed
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user