File 0013-Medium-exportfs-Only-strip-brackets-from-edges-of-cl.patch of Package resource-agents.11561

From 9047de8e077f48e4f2c3960cc69dc2ec93108ad9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kristoffer=20Gr=C3=B6nlund?= <krig@koru.se>
Date: Wed, 1 Feb 2017 15:44:30 +0100
Subject: [PATCH] Medium: exportfs: Only strip brackets from edges of
 clientspec (bsc#1022223)

---
 heartbeat/exportfs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/heartbeat/exportfs b/heartbeat/exportfs
index c6ea920..d058633 100755
--- a/heartbeat/exportfs
+++ b/heartbeat/exportfs
@@ -266,11 +266,14 @@ is_exported() {
 
 exportfs_monitor ()
 {
+	local spec
+
 	if ! ha_pseudo_resource "${OCF_RESOURCE_INSTANCE}" monitor; then
 		return $OCF_NOT_RUNNING
 	fi
 
-	if forall is_exported "$(echo "${OCF_RESKEY_clientspec}" | tr -d '[]')"; then
+	spec="$(echo "$OCF_RESKEY_clientspec" | sed -e 's/^\[*//' -e 's/\]*$//')"
+	if forall is_exported "$spec"; then
 		if [ ${OCF_RESKEY_rmtab_backup} != "none" ]; then
 			forall backup_rmtab
 		fi
-- 
2.10.1

openSUSE Build Service is sponsored by