From 89f72bb6edfc8437c3681e95b6c7b91e62c2da70 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Mon, 5 Apr 2021 16:44:51 -0400 Subject: [PATCH] check if . in new version, append .1 if not --- salt/common/tools/sbin/soup | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index d06002b7d..eda93fc1f 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -649,6 +649,12 @@ fi echo "Checking if Salt was upgraded." echo "" # Check that Salt was upgraded +SALTVERSIONPOSTUPGRADE=$(salt --versions-report | grep Salt: | awk {'print $2'}) +if [[ "." =~ .*"$SALTVERSIONPOSTUPGRADE".* ]]; then + SALTVERSIONPOSTUPGRADE=$SALTVERSIONPOSTUPGRADE +else + SALTVERSIONPOSTUPGRADE="${SALTVERSIONPOSTUPGRADE}.1" +fi if [[ $(salt --versions-report | grep Salt: | awk {'print $2'}) != "$NEWSALTVERSION" ]]; then echo "Salt upgrade failed. Check of indicators of failure in $SOUP_LOG." echo "Once the issue is resolved, run soup again."