From c466e316c424a106407011884e6a93fea8a3cd70 Mon Sep 17 00:00:00 2001 From: Niels Huylebroeck Date: Fri, 29 Jan 2021 19:43:39 +0100 Subject: [PATCH] Added basic RHEL8 support See issue #5 --- check-yum-updates/check-yum-updates.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/check-yum-updates/check-yum-updates.sh b/check-yum-updates/check-yum-updates.sh index 71a4f1c..4c9be7c 100644 --- a/check-yum-updates/check-yum-updates.sh +++ b/check-yum-updates/check-yum-updates.sh @@ -39,8 +39,13 @@ elif grep -q -i "release 7" /etc/redhat-release ; then IMPORTANT=$(yum updateinfo list --sec-severity=Important | grep Important | wc -l) LOW=$(yum updateinfo list --sec-severity=Low | grep Low | wc -l) CRITICAL=$(yum updateinfo list --sec-severity=Critical | grep Critical | wc -l) +elif grep -q -i "release 8" /etc/redhat-release ; then + MODERATE=$(yum updateinfo list --sec-severity=Moderate | grep Moderate | wc -l) + IMPORTANT=$(yum updateinfo list --sec-severity=Important | grep Important | wc -l) + LOW=$(yum updateinfo list --sec-severity=Low | grep Low | wc -l) + CRITICAL=$(yum updateinfo list --sec-severity=Critical | grep Critical | wc -l) else - echo "Running neither RHEL6.x nor RHEL 7.x !" + echo "Running neither RHEL6.x/7.x/8.x !" fi