|
|
1ed92e |
From c41efcaa658ea7987e03f9f864e9c13bce74bb20 Mon Sep 17 00:00:00 2001
|
|
|
1ed92e |
From: AngelaBriel <abriel@suse.com>
|
|
|
1ed92e |
Date: Thu, 25 Nov 2021 15:15:23 +0100
|
|
|
1ed92e |
Subject: [PATCH] supress output of comman 'systemctl list-unit-files'
|
|
|
1ed92e |
|
|
|
1ed92e |
---
|
|
|
1ed92e |
heartbeat/SAPHanaController | 2 +-
|
|
|
1ed92e |
heartbeat/SAPHanaTopology | 2 +-
|
|
|
1ed92e |
2 files changed, 2 insertions(+), 2 deletions(-)
|
|
|
1ed92e |
|
|
|
1ed92e |
diff --git a/heartbeat/SAPHanaController b/heartbeat/SAPHanaController
|
|
|
1ed92e |
index a98293c..9b1c401 100755
|
|
|
1ed92e |
--- a/heartbeat/SAPHanaController
|
|
|
1ed92e |
+++ b/heartbeat/SAPHanaController
|
|
|
1ed92e |
@@ -1137,7 +1137,7 @@ function chk4systemdsupport() {
|
|
|
1ed92e |
if [ -x "$SYSTEMCTL" ]; then
|
|
|
1ed92e |
if [ -f /etc/systemd/system/"$systemd_unit_name" ]; then
|
|
|
1ed92e |
rc=0
|
|
|
1ed92e |
- elif $SYSTEMCTL list-unit-files "$systemd_unit_name"; then
|
|
|
1ed92e |
+ elif $SYSTEMCTL list-unit-files "$systemd_unit_name" >/dev/null 2>&1; then
|
|
|
1ed92e |
rc=0
|
|
|
1ed92e |
else
|
|
|
1ed92e |
rc=1
|
|
|
1ed92e |
diff --git a/heartbeat/SAPHanaTopology b/heartbeat/SAPHanaTopology
|
|
|
1ed92e |
index b025b5b..304cea8 100755
|
|
|
1ed92e |
--- a/heartbeat/SAPHanaTopology
|
|
|
1ed92e |
+++ b/heartbeat/SAPHanaTopology
|
|
|
1ed92e |
@@ -574,7 +574,7 @@ function chk4systemdsupport() {
|
|
|
1ed92e |
if [ -x "$SYSTEMCTL" ]; then
|
|
|
1ed92e |
if [ -f /etc/systemd/system/"$systemd_unit_name" ]; then
|
|
|
1ed92e |
rc=0
|
|
|
1ed92e |
- elif $SYSTEMCTL list-unit-files "$systemd_unit_name"; then
|
|
|
1ed92e |
+ elif $SYSTEMCTL list-unit-files "$systemd_unit_name" >/dev/null 2>&1; then
|
|
|
1ed92e |
rc=0
|
|
|
1ed92e |
else
|
|
|
1ed92e |
rc=1
|