sapconf/SOURCES/sapconf-0.99-#1701314-funct...

12 lines
763 B
Diff

--- sapconf-0.99/sapconf-0.99-#1701314-function-check_rhn-does-not-cath-major-release-number 2019-05-21 14:12:39.941651612 +0100
+++ sapconf-0.99/sapconf 2019-05-21 15:44:01.888215988 +0100
@@ -713,7 +713,7 @@
# Checks if system is subscribed to RHEL for SAP Channel
function check_rhn() {
-if yum repolist | egrep -q "rhel-$(uname -m)-server-sap|rhel-sap-for-rhel-$(awk '{print $7}' /etc/redhat-release | cut -c -1)-server(-e4s|-eus)?-rpms"; then
+if yum repolist | egrep "rhel-$(awk '{split($(NF-1), a, "."); print a[1]}' /etc/redhat-release)-for-$(uname -m)-sap-netweaver(-beta|-e4s|-eus)?-rpms" ; then
out "RHEL system subscribed to RHEL for SAP channel ... OK"
else
out "RHEL system not subscribed to RHEL for SAP channel ... WARNING"