Blame SOURCES/bz2043021-2-SAPHana-SAPHanaTopology-suppress-systemctl-output.patch

d18f68
From 28658d187bbfdcb6a7c570f327c20be4ae253794 Mon Sep 17 00:00:00 2001
d18f68
From: AngelaBriel <abriel@suse.com>
d18f68
Date: Thu, 25 Nov 2021 15:17:10 +0100
d18f68
Subject: [PATCH] supress output of comman 'systemctl list-unit-files'
d18f68
d18f68
---
d18f68
 heartbeat/SAPHana         | 2 +-
d18f68
 heartbeat/SAPHanaTopology | 2 +-
d18f68
 2 files changed, 2 insertions(+), 2 deletions(-)
d18f68
d18f68
diff --git a/heartbeat/SAPHana b/heartbeat/SAPHana
d18f68
index aaff777..3569b3d 100755
d18f68
--- a/heartbeat/SAPHana
d18f68
+++ b/heartbeat/SAPHana
d18f68
@@ -956,7 +956,7 @@ function chk4systemdsupport() {
d18f68
     if [ -x "$SYSTEMCTL" ]; then
d18f68
         if [ -f /etc/systemd/system/"$systemd_unit_name" ]; then
d18f68
             rc=0
d18f68
-        elif $SYSTEMCTL list-unit-files "$systemd_unit_name"; then
d18f68
+        elif $SYSTEMCTL list-unit-files "$systemd_unit_name" >/dev/null 2>&1; then
d18f68
             rc=0
d18f68
         else
d18f68
             rc=1
d18f68
diff --git a/heartbeat/SAPHanaTopology b/heartbeat/SAPHanaTopology
d18f68
index 8dd133e..74f3e72 100755
d18f68
--- a/heartbeat/SAPHanaTopology
d18f68
+++ b/heartbeat/SAPHanaTopology
d18f68
@@ -674,7 +674,7 @@ function chk4systemdsupport() {
d18f68
     if [ -x "$SYSTEMCTL" ]; then
d18f68
         if [ -f /etc/systemd/system/"$systemd_unit_name" ]; then
d18f68
             rc=0
d18f68
-        elif $SYSTEMCTL list-unit-files "$systemd_unit_name"; then
d18f68
+        elif $SYSTEMCTL list-unit-files "$systemd_unit_name" >/dev/null 2>&1; then
d18f68
             rc=0
d18f68
         else
d18f68
             rc=1