Blame SOURCES/bz1751962-nfsserver-2-systemd-use-no-legend.patch

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