From ecb7c961678c4c6f12943964676e33ccfbf2b740 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 19 May 2011 09:29:11 -0700 Subject: [PATCH] mkcephfs: pick rdir based on whether current daemon is local or not We need to pick $rdir as local or remote inside the for name loop. Fixes: #1094 Signed-off-by: Sage Weil --- src/mkcephfs.in | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/mkcephfs.in b/src/mkcephfs.in index e87709c6690c6..8558754e58c4b 100644 --- a/src/mkcephfs.in +++ b/src/mkcephfs.in @@ -391,14 +391,6 @@ if [ $allhosts -eq 1 ]; then trap "rm -rf $dir ; exit" INT TERM EXIT fi - # temp dir on remote nodes - if [ -n "$ssh" ]; then - rdir="/tmp/mkfs.ceph.$$" - echo "remote temp dir is $rdir" - else - rdir=$dir - fi - $0 --prepare-monmap -d $dir -c $conf # osd, mds @@ -412,10 +404,13 @@ if [ $allhosts -eq 1 ]; then check_host || continue if [ -n "$ssh" ]; then - echo pushing conf and monmap to $host + rdir="/tmp/mkfs.ceph.$$" + echo pushing conf and monmap to $host:$rdir do_cmd "mkdir -p $rdir" scp -q $dir/conf $host:$rdir scp -q $dir/monmap $host:$rdir + else + rdir=$dir fi if [ $mkbtrfs -eq 1 ] && [ "$type" = "osd" ]; then -- 2.39.5