From: Sage Weil Date: Fri, 15 Apr 2011 21:03:20 +0000 (-0700) Subject: mkcephfs, init-ceph: tolerate complete lack of a type X-Git-Tag: v0.27~20^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=925a2e0e8f44ddbe645072645bb3eec4d0039047;p=ceph.git 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 --- diff --git a/src/ceph_common.sh b/src/ceph_common.sh index 4b03aa24937..0c5ea52d849 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"