]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs: fix premature tmp directory deletion
authorSamuel Just <samuel.just@dreamhost.com>
Thu, 17 Feb 2011 19:43:58 +0000 (11:43 -0800)
committerSamuel Just <samuel.just@dreamhost.com>
Thu, 17 Feb 2011 19:53:27 +0000 (11:53 -0800)
Previously, the temp directory would be deleted after the first daemon
on a host was started leaving the second one to fail.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/mkcephfs.in

index a754165f49bf7708d5b82a7ae460168d53b13ea4..a4c60adee2b1cb98fe11f4d052f45d7857c3bbc1 100644 (file)
@@ -282,6 +282,12 @@ for name in $what; do
        fi
        rm -f $TDIR/keyring.mds.$id
     fi
+done
+
+for name in $what; do
+    type=`echo $name | cut -c 1-3`   # e.g. 'mon', if $name is 'mon1'
+    id=`echo $name | cut -c 4- | sed 's/\\.//'`
+    num=$id
     if [ -n "$ssh" ]; then
         ssh $host rm -rf $TDIR
     fi