fix check of salt was upgraded during soup for ubuntu and centos

This commit is contained in:
m0duspwnens
2020-11-17 16:18:50 -05:00
parent 65b84f1bd7
commit 1fd2196dd5

View File

@@ -460,8 +460,8 @@ fi
echo "Checking if Salt was upgraded." echo "Checking if Salt was upgraded."
echo "" echo ""
# Check that Salt was upgraded, should be 3 'salt' packages on a manager node. salt-minion, salt-master and salt or salt-common depending on Ubuntu or CentOS. we could add salt-syndic in the future so checking that there are at least 3 packages # Check that Salt was upgraded
if [[ `rpm -qa | grep salt | grep $NEWSALTVERSION | wc -l` < 3 ]]; then if [[ `salt --versions-report | grep Salt: | awk {'print $2'}` == "$NEWSALTVERSION" ]]; then
echo "Salt upgrade failed. Check of indicators of failure in $SOUP_LOG." echo "Salt upgrade failed. Check of indicators of failure in $SOUP_LOG."
echo "Once the issue is resolved, run soup again." echo "Once the issue is resolved, run soup again."
echo "Exiting." echo "Exiting."