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

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