Whamcloud - gitweb
LU-707 Fix FID string quoting in replay-vbr
authorLi Wei <liwei@whamcloud.com>
Fri, 9 Sep 2011 06:05:56 +0000 (14:05 +0800)
committerOleg Drokin <green@whamcloud.com>
Sun, 23 Oct 2011 04:39:37 +0000 (00:39 -0400)
The FID string printed by the "path2fid" lfs command was passed to
do_facet() without any quoting.  Depending on the names of the files in
the remote shell's working directory, the FID string could be replaced,
by the shell's filename expansion, to a list of matching file names.
This patch adds the necessary quoting prevent the remote shell from
doing filename expansion on the FID string.

Change-Id: I0bc28eb7f29df717a661a4c1bce8c918117b997c
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/1409
Tested-by: Hudson
Reviewed-by: Mikhail Pershin <tappro@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>

index a5a71ec..1aecf89 100644 (file)
@@ -86,7 +86,7 @@ get_version() {
     local fid
     fid=$(do_node $client $LFS path2fid $file)
-    do_facet $SINGLEMDS $LCTL --device ${!var} getobjversion $fid
+    do_facet $SINGLEMDS $LCTL --device ${!var} getobjversion \\\"$fid\\\"
 #save COS setting