ClusterLabs/resource-agents — pull request #45 by acqant (2011-12-13 17:59:09+00:00)
Title: exportfs change to support wildcard exports

--- a/heartbeat/exportfs
+++ b/heartbeat/exportfs
@@ -181,9 +181,11 @@ END

exportfs_monitor ()
{
+ local clientspec_re
# "grep -z" matches across newlines, which is necessary as
# exportfs output wraps lines for long export directory names
- exportfs | grep -zqs "${OCF_RESKEY_directory}[[:space:]]*${OCF_RESKEY_clientspec}"
+ clientspec_re=`echo ${OCF_RESKEY_clientspec} | sed 's/*/[*]/'`
+ exportfs | grep -zqs "${OCF_RESKEY_directory}[[:space:]]*${clientspec_re}"

#Adapt grep status code to OCF return code
case $? in