From 03b6c40b17d8c929f44073e6d674dab4190cba40 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 6 Jul 2011 15:02:42 -0700 Subject: [PATCH] qa: mds rename: account for not being in the ceph root dir We need to know the Ceph absolute path. We can't actually derive that for sure (if we aren't mounted into the root), but this at least lets us deal with being in our own subdirectories. Signed-off-by: Greg Farnum --- qa/workunits/rename/prepare.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qa/workunits/rename/prepare.sh b/qa/workunits/rename/prepare.sh index 55f8fa3d67d32..b5ba4ae58a46e 100755 --- a/qa/workunits/rename/prepare.sh +++ b/qa/workunits/rename/prepare.sh @@ -11,8 +11,11 @@ mkdir -p ./b/b mkdir -p ./c/c mkdir -p ./d/d -$CEPH_TOOL mds tell 0 export_dir /b 1 -$CEPH_TOOL mds tell 0 export_dir /c 2 -$CEPH_TOOL mds tell 0 export_dir /d 3 +mount_dir=`df . | grep -o " /.*" | grep -o "/.*"` +cur_dir=`pwd` +ceph_dir=${cur_dir##$mount_dir} +$CEPH_TOOL mds tell 0 export_dir $ceph_dir/b 1 +$CEPH_TOOL mds tell 0 export_dir $ceph_dir/c 2 +$CEPH_TOOL mds tell 0 export_dir $ceph_dir/d 3 sleep 5 -- 2.39.5