From 5c4be5e1cd9699b92e3ecc36a4121c69ef14fdf0 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Wed, 21 Apr 2021 16:15:40 -0400 Subject: [PATCH] soup will now ask to update packages --- salt/common/tools/sbin/soup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index e41e80afe..51d9f9fe1 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -165,11 +165,11 @@ check_os_updates() { # Check to see if there are OS updates NEEDUPDATES="We have detected missing operating system (OS) updates. Do you want to install these OS updates now? This could take a while depending on the size of your grid and how many packages are missing, but it is recommended to keep your system updated." if [[ $OS == 'ubuntu' ]]; then - OSUPDATES=$(apt list --upgradeable | wc -l) + OSUPDATES=$(apt list --upgradeable | grep -v "^Listing..." | grep -v "^docker-ce" | grep -v "^wazuh-" | grep -v "^salt-" | wc -l) else OSUPDATES=$(yum -q list updates | wc -l) fi - if [[ "$OSUPDATES" > 1 ]]; then + if [[ "$OSUPDATES" -gt 1 ]]; then echo $NEEDUPDATES echo "" read -p "Press U to update OS packages (recommended), C to continue without updates, or E to exit: " confirm