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

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