]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_common.sh: tolerate missing mds, mon, osds in conf
authorSage Weil <sage@inktank.com>
Tue, 26 Feb 2013 19:10:44 +0000 (11:10 -0800)
committerSage Weil <sage@inktank.com>
Tue, 26 Feb 2013 19:10:44 +0000 (11:10 -0800)
With set -e this seems to fail (at least on some machines) if, say, there
is no MDS in the conf file.  This fixes it.

Tested-by: Mark Nelson <mark.nelson@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
src/ceph_common.sh

index af2576b3cd49726d5189e7c7742ebcbe65b27d73..4851a785e8f85f1136f5cfdc404e7d9c3ba3bb17 100644 (file)
@@ -147,9 +147,9 @@ get_name_list() {
     orig="$*"
 
     # extract list of monitors, mdss, osds defined in startup.conf
-    allconf=`$CCONF -c $conf -l mon | egrep -v '^mon$' ; \
-       $CCONF -c $conf -l mds | egrep -v '^mds$' ; \
-       $CCONF -c $conf -l osd | egrep -v '^osd$'`
+    allconf=`$CCONF -c $conf -l mon | egrep -v '^mon$' || true ; \
+       $CCONF -c $conf -l mds | egrep -v '^mds$' || true ; \
+       $CCONF -c $conf -l osd | egrep -v '^osd$' || true`
 
     if [ -z "$orig" ]; then
        what="$allconf $local"