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