Blame SOURCES/bz2024140-SAPInstance-2-fix-systemd-issue.patch

fa612c
From 9a851525c30a4bdb522e64301268c9ef2188ae83 Mon Sep 17 00:00:00 2001
fa612c
From: fmherschel <fh-github@herschel-mainz.org>
fa612c
Date: Mon, 9 Aug 2021 11:57:22 +0200
fa612c
Subject: [PATCH] SAPInstance: Fix for issue #1680 - SAPInstance fails to
fa612c
 detect systemd integration (#1681)
fa612c
fa612c
* SAPInstance: Fix for issue #1680 - SAPInstance fails to detect systemd integration
fa612c
---
fa612c
 heartbeat/SAPInstance | 2 +-
fa612c
 1 file changed, 1 insertion(+), 1 deletion(-)
fa612c
fa612c
diff --git a/heartbeat/SAPInstance b/heartbeat/SAPInstance
fa612c
index 15b24024e..f8bcbc05b 100755
fa612c
--- a/heartbeat/SAPInstance
fa612c
+++ b/heartbeat/SAPInstance
fa612c
@@ -456,7 +456,7 @@ check_systemd_integration() {
fa612c
     local systemd_unit_name="SAP${SID}_${InstanceNr}"
fa612c
     local rc=1
fa612c
 
fa612c
-    if [ -x "$SYSTEMCTL" ]; then
fa612c
+    if which "$SYSTEMCTL" 1>/dev/null 2>/dev/null; then
fa612c
         if $SYSTEMCTL list-unit-files | \
fa612c
             awk '$1 == service { found=1 } END { if (! found) {exit 1}}' service="${systemd_unit_name}.service"; then
fa612c
             rc=0