Fix "upgrade to" message

Only specify "to" version and change when the upgrade message occurs
This commit is contained in:
William Wernert
2021-09-23 12:47:22 -04:00
parent a01d49981c
commit 8a9dcb7fdb

View File

@@ -992,8 +992,6 @@ main() {
set +e set +e
salt-call state.highstate -l info queue=True salt-call state.highstate -l info queue=True
set -e set -e
echo ""
echo "Upgrade from $INSTALLEDVERSION to $NEWVERSION complete."
echo "" echo ""
echo "Stopping Salt Master to remove ACL" echo "Stopping Salt Master to remove ACL"
@@ -1016,6 +1014,8 @@ main() {
[[ $is_airgap -eq 0 ]] && unmount_update [[ $is_airgap -eq 0 ]] && unmount_update
thehive_maint thehive_maint
echo ""
echo "Upgrade to $NEWVERSION complete."
echo "Checking the number of minions." echo "Checking the number of minions."
NUM_MINIONS=$(ls /opt/so/saltstack/local/pillar/minions/*_*.sls | wc -l) NUM_MINIONS=$(ls /opt/so/saltstack/local/pillar/minions/*_*.sls | wc -l)
if [[ $UPGRADESALT -eq 1 ]] && [[ $NUM_MINIONS -gt 1 ]]; then if [[ $UPGRADESALT -eq 1 ]] && [[ $NUM_MINIONS -gt 1 ]]; then