summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
Diffstat (limited to 'extras')
-rw-r--r--extras/ganesha/ocf/ganesha_mon14
1 files changed, 9 insertions, 5 deletions
diff --git a/extras/ganesha/ocf/ganesha_mon b/extras/ganesha/ocf/ganesha_mon
index 7d0eb6b9cb8..7d2c268d412 100644
--- a/extras/ganesha/ocf/ganesha_mon
+++ b/extras/ganesha/ocf/ganesha_mon
@@ -125,17 +125,21 @@ ganesha_mon_stop()
ganesha_mon_monitor()
{
local host=$(hostname -s)
- local pid_file="/var/run/ganesha.nfsd.pid"
+ local pid_file="/var/run/ganesha.pid"
+ local rhel6_pid_file="/var/run/ganesha.nfsd.pid"
+ local proc_pid="/proc/"
# RHEL6 /etc/init.d/nfs-ganesha adds -p /var/run/ganesha.nfsd.pid
# RHEL7 systemd does not. Would be nice if all distros used the
# same pid file.
- if [ -e /usr/lib/systemd/system/nfs-ganesha.service ]; then
- pid_file="/var/run/ganesha.pid"
+ if [ -e ${rhel6_pid_file} ]; then
+ pid_file=${rhel6_pid_file}
+ fi
+ if [ -e ${pid_file} ]; then
+ proc_pid="${proc_pid}$(cat ${pid_file})"
fi
- if [ -e ${pid_file} -a \
- -d /proc/$(cat ${pid_file} ) ]; then
+ if [ "x${proc_pid}" != "x/proc/" -a -d ${proc_pid} ]; then
attrd_updater -n ${OCF_RESKEY_ganesha_active} -v 1
if [ $? -ne 0 ]; then