mirror of
https://github.com/ceph/ceph
synced 2025-01-19 01:21:49 +00:00
mkcephfs: nicer empty directory check
From TV. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
4e66a3b98d
commit
4eec4fc57d
@ -267,7 +267,7 @@ if [ -n "$initdaemon" ]; then
|
||||
|
||||
if [ $type = "mon" ]; then
|
||||
get_conf mon_data "/var/run/ceph/mon/ceph-$id" "mon data"
|
||||
if [ `ls $mon_data | wc -l` -ne 0 ]; then
|
||||
if ! 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
|
||||
|
Loading…
Reference in New Issue
Block a user