]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs: fix mon_data check
authorSage Weil <sage@inktank.com>
Tue, 14 Aug 2012 23:53:18 +0000 (16:53 -0700)
committerSage Weil <sage@inktank.com>
Tue, 14 Aug 2012 23:53:34 +0000 (16:53 -0700)
* check the right path <facepalm>
* behave if the directory doesn't exist at all yet

Fixes: #2922
Signed-off-by: Sage Weil <sage@inktank.com>
src/mkcephfs.in

index 4edb7f1b7c7312cb7c6d049bef17fdd60e0cbdd5..7939ad539187e297d5318ce2d949045e9fd625b2 100644 (file)
@@ -266,8 +266,8 @@ if [ -n "$initdaemon" ]; then
     fi
 
     if [ $type = "mon" ]; then
-       get_conf mon_data "/var/run/ceph/mon/ceph-$id" "mon data"
-       if ! find "$mon_data" -maxdepth 0 -empty | read; then
+       get_conf mon_data "/var/lib/ceph/mon/ceph-$id" "mon data"
+       if test -d $mon_data && ! find "$mon_data" -maxdepth 0 -empty | read; then
            echo "ERROR: $name mon_data directory $mon_data is not empty."
            echo "       Please make sure that it is empty before running mkcephfs."
            exit 1