From 05b8d8f974d697d79d70b4c0ddfc9c9e5c82e560 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Tue, 7 Jun 2022 09:12:55 +0200
Subject: [PATCH] add sudo when calling yum

---
 check_packages2install-pkgmanager/yum.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/check_packages2install-pkgmanager/yum.sh b/check_packages2install-pkgmanager/yum.sh
index 6e557c6..735f8e0 100644
--- a/check_packages2install-pkgmanager/yum.sh
+++ b/check_packages2install-pkgmanager/yum.sh
@@ -35,7 +35,7 @@ function yumPackages(){
 # ---------------------------------------------------------------
 # get custom status
 function yumStatus(){
-  if ! /usr/bin/yum --bugfix check-update 2>&1 | grep security; then
+  if ! sudo /usr/bin/yum --bugfix check-update 2>&1 | grep security; then
     echo "Ooops - no output from [/usr/bin/yum --bugfix check-update]"
   fi
 }
-- 
GitLab