]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mkcephfs, init-ceph: tolerate complete lack of a type
authorSage Weil <sage.weil@dreamhost.com>
Fri, 15 Apr 2011 21:03:20 +0000 (14:03 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 15 Apr 2011 21:03:59 +0000 (14:03 -0700)
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 <sage.weil@dreamhost.com>
src/ceph_common.sh

index 4b03aa2493740c2fe91fc8ddd73b5b2f017f94f1..0c5ea52d8490a09f636432ce70f7c03a17b563c1 100644 (file)
@@ -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"