File 0007-High-nfsserver-Delete-the-temp-file-correctly.patch of Package resource-agents.5203

From 71f917f67fca8e06361d7af0aeb00815e48ea0dc Mon Sep 17 00:00:00 2001
From: ytakeshita <y.takeshita0311@gmail.com>
Date: Fri, 19 Aug 2016 15:33:26 +0900
Subject: [PATCH 07/12] High: nfsserver: Delete the temp file correctly.

The file name ($fn) which is created in nfsserver_monitor() is overwritten in nfsserver_systemd_monitor().
As a result it is failed to delete the file and continue to increase the file on /tmp.
---
 heartbeat/nfsserver | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/heartbeat/nfsserver b/heartbeat/nfsserver
index 4b6767b..7d539b9 100755
--- a/heartbeat/nfsserver
+++ b/heartbeat/nfsserver
@@ -297,6 +297,7 @@ nfsserver_systemd_monitor()
 {
 	local threads_num
 	local rc
+	local fn
 
 	nfs_exec is-active
 	rc=$?
@@ -323,6 +324,8 @@ nfsserver_systemd_monitor()
 
 nfsserver_monitor ()
 {
+	local fn
+
 	set_exec_mode
 	fn=`mktemp`
 	case $EXEC_MODE in
@@ -555,6 +558,7 @@ notify_locks()
 nfsserver_start ()
 {
 	local rc;
+	local fn
 
 	if nfsserver_monitor; then
 		ocf_log debug "NFS server is already started"
@@ -614,6 +618,8 @@ nfsserver_start ()
 
 nfsserver_stop ()
 {
+	local fn
+
 	ocf_log info "Stopping NFS server ..."
 
 	# backup the current sm state information to the ha folder before stopping.
-- 
2.10.1

openSUSE Build Service is sponsored by