From 925a2e0e8f44ddbe645072645bb3eec4d0039047 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 15 Apr 2011 14:03:20 -0700 Subject: [PATCH] mkcephfs, init-ceph: tolerate complete lack of a type We were bailing out of mkcephfs with a config with no mds's defined (because we set -e and grep returns an error here). Signed-off-by: Sage Weil --- src/ceph_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ceph_common.sh b/src/ceph_common.sh index 4b03aa2493740..0c5ea52d8490a 100644 --- a/src/ceph_common.sh +++ b/src/ceph_common.sh @@ -124,7 +124,7 @@ get_name_list() { for f in $orig; do type=`echo $f | cut -c 1-3` # e.g. 'mon', if $item is 'mon1' id=`echo $f | cut -c 4- | sed 's/\\.//'` - all=`$CCONF -c $conf -l $type | egrep -v "^$type$"` + all=`$CCONF -c $conf -l $type | egrep -v "^$type$" || true` case $f in mon | osd | mds) what="$what $all" -- 2.39.5