resource-agents/SOURCES/bz1751962-nfsserver-2-systemd-use-no-legend.patch
2021-09-10 03:52:59 +00:00

39 lines
1.3 KiB
Diff

From ca9d2f9c2d23a9dc783e0d52419790d0d441232c Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Tue, 24 Sep 2019 09:12:47 +0200
Subject: [PATCH] nfsserver: use "--no-legend" for systemctl "list-unit-files"
calls
---
heartbeat/nfsserver | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/heartbeat/nfsserver b/heartbeat/nfsserver
index 8527a90f3..acef0147a 100755
--- a/heartbeat/nfsserver
+++ b/heartbeat/nfsserver
@@ -234,12 +234,12 @@ set_exec_mode()
fi
if which systemctl > /dev/null 2>&1; then
- if systemctl list-unit-files 'nfs-*' | grep nfs-server > /dev/null; then
+ if systemctl --no-legend list-unit-files 'nfs-*' | grep nfs-server > /dev/null; then
##
# Attempt systemd (with nfs-lock.service).
##
- if systemctl list-unit-files 'nfs-*' | grep nfs-lock > /dev/null; then
+ if systemctl --no-legend list-unit-files 'nfs-*' | grep nfs-lock > /dev/null; then
EXEC_MODE=2
# when using systemd, the nfs-lock service file handles nfsv3 locking daemons for us.
return 0
@@ -248,7 +248,7 @@ set_exec_mode()
##
# Attempt systemd (with rpc-statd.service).
##
- if systemctl list-unit-files 'rpc-*' | grep rpc-statd > /dev/null; then
+ if systemctl --no-legend list-unit-files 'rpc-*' | grep rpc-statd > /dev/null; then
EXEC_MODE=3
return 0
fi