diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index e9313ad9e..c1e25b208 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -932,7 +932,8 @@ main() { [[ $is_airgap -eq 0 ]] && unmount_update thehive_maint - if [[ $UPGRADESALT -eq 1 ]]; then + NUM_MINIONS=$(ls /opt/so/saltstack/local/pillar/minions/*_*.sls | wc -l) + if [[ $UPGRADESALT -eq 1 ]] && [[ $NUM_MINIONS -gt 1 ]]; then if [[ $is_airgap -eq 0 ]]; then echo "" echo "Cleaning repos on remote Security Onion nodes." @@ -959,8 +960,6 @@ main() { esac fi - NUM_MINIONS=$(ls /opt/so/saltstack/local/pillar/minions/*_*.sls | wc -l) - if [[ $NUM_MINIONS -gt 1 ]]; then cat << EOF