Skip to content

Commit 78ce005

Browse files
authored
Merge pull request #2104 from vvidic/exportfs-cache
exportfs: fix grep error on stop
2 parents 5cc74ac + bdfbc26 commit 78ce005

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

heartbeat/exportfs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,10 @@ cleanup_export_cache() {
390390
local contentfile=/proc/net/rpc/nfsd.export/content
391391
local fsid_re
392392
local i=1
393-
fsid_re="fsid=(echo `forall get_fsid`|sed 's/ /|/g'),"
393+
local fsid_all=`forall get_fsid`
394+
fsid_re="fsid=(`echo $fsid_all | sed 's/ /|/g'`),"
394395
while :; do
395-
grep -E -q "$fsid_re" $contentfile ||
396-
break
396+
grep -E -q "$fsid_re" $contentfile || break
397397
ocf_log info "Cleanup export cache ... (try $i)"
398398
ocf_run exportfs -f
399399
sleep 0.5

0 commit comments

Comments
 (0)