Blob Blame History Raw
From 28658d187bbfdcb6a7c570f327c20be4ae253794 Mon Sep 17 00:00:00 2001
From: AngelaBriel <abriel@suse.com>
Date: Thu, 25 Nov 2021 15:17:10 +0100
Subject: [PATCH] supress output of comman 'systemctl list-unit-files'

---
 heartbeat/SAPHana         | 2 +-
 heartbeat/SAPHanaTopology | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/heartbeat/SAPHana b/heartbeat/SAPHana
index aaff777..3569b3d 100755
--- a/heartbeat/SAPHana
+++ b/heartbeat/SAPHana
@@ -956,7 +956,7 @@ function chk4systemdsupport() {
     if [ -x "$SYSTEMCTL" ]; then
         if [ -f /etc/systemd/system/"$systemd_unit_name" ]; then
             rc=0
-        elif $SYSTEMCTL list-unit-files "$systemd_unit_name"; then
+        elif $SYSTEMCTL list-unit-files "$systemd_unit_name" >/dev/null 2>&1; then
             rc=0
         else
             rc=1
diff --git a/heartbeat/SAPHanaTopology b/heartbeat/SAPHanaTopology
index 8dd133e..74f3e72 100755
--- a/heartbeat/SAPHanaTopology
+++ b/heartbeat/SAPHanaTopology
@@ -674,7 +674,7 @@ function chk4systemdsupport() {
     if [ -x "$SYSTEMCTL" ]; then
         if [ -f /etc/systemd/system/"$systemd_unit_name" ]; then
             rc=0
-        elif $SYSTEMCTL list-unit-files "$systemd_unit_name"; then
+        elif $SYSTEMCTL list-unit-files "$systemd_unit_name" >/dev/null 2>&1; then
             rc=0
         else
             rc=1