cluster: RHEL48 - rgmanager: fix netfsclient cache handling

Lon Hohberger lon at fedoraproject.org
Mon Apr 5 14:23:30 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1ebe0d71a2cc822e3c805da33b815af3e3393ef0
Commit:        1ebe0d71a2cc822e3c805da33b815af3e3393ef0
Parent:        04d4b4acc681f8af1a467ffac077e5898ad19592
Author:        Juanjo Villaplana <villapla at si.uji.es>
AuthorDate:    Thu Feb 26 10:33:34 2009 -0500
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Mon Apr 5 09:56:03 2010 -0400

rgmanager: fix netfsclient cache handling

Ensures correct removal of temporary file when client
caching is disabled.

Resolves: rhbz506152 rhbz572632

Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
 rgmanager/src/resources/nfsclient.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rgmanager/src/resources/nfsclient.sh b/rgmanager/src/resources/nfsclient.sh
index 70e69f1..7e8104a 100755
--- a/rgmanager/src/resources/nfsclient.sh
+++ b/rgmanager/src/resources/nfsclient.sh
@@ -413,13 +413,13 @@ status|monitor)
 	rv=$? 
 
 	if [ $rv -eq 0 ]; then
-		[ -z "$OCF_RESKEY_service_name" ] && rm -f $tmpfn
+		[ "$OCF_RESKEY_use_cache" = "1" ] || rm -f $tmpfn
 		exit 0
 	fi
 
 	declare OCF_RESKEY_target_tmp=$(clufindhostname -i "$OCF_RESKEY_target")
 	if [ $? -ne 0 ]; then
-		[ -z "$OCF_RESKEY_service_name" ] && rm -f $tmpfn
+		[ "$OCF_RESKEY_use_cache" = "1" ] || rm -f $tmpfn
 		ocf_log err "nfsclient:$OCF_RESKEY_name is missing!"
 		exit 1
 	fi
@@ -428,7 +428,7 @@ status|monitor)
 		"^${OCF_RESKEY_path}[\t ]*.*${OCF_RESKEY_target_tmp}" 
 	rv=$? 
 
-	[ -z "$OCF_RESKEY_service_name" ] && rm -f $tmpfn
+	[ "$OCF_RESKEY_use_cache" = "1" ] || rm -f $tmpfn
 	if [ $rv -eq 0 ]; then
 		exit 0
 	fi


More information about the cluster-commits mailing list