From c41efcaa658ea7987e03f9f864e9c13bce74bb20 Mon Sep 17 00:00:00 2001
From: AngelaBriel <abriel@suse.com>
Date: Thu, 25 Nov 2021 15:15:23 +0100
Subject: [PATCH] supress output of comman 'systemctl list-unit-files'
---
heartbeat/SAPHanaController | 2 +-
heartbeat/SAPHanaTopology | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/heartbeat/SAPHanaController b/heartbeat/SAPHanaController
index a98293c..9b1c401 100755
--- a/heartbeat/SAPHanaController
+++ b/heartbeat/SAPHanaController
@@ -1137,7 +1137,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 b025b5b..304cea8 100755
--- a/heartbeat/SAPHanaTopology
+++ b/heartbeat/SAPHanaTopology
@@ -574,7 +574,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