From: Sage Weil Date: Tue, 26 Feb 2013 19:10:44 +0000 (-0800) Subject: ceph_common.sh: tolerate missing mds, mon, osds in conf X-Git-Tag: v0.58~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=95a379aa7391b988c32765891b0010b2f46014fc;p=ceph.git ceph_common.sh: tolerate missing mds, mon, osds in conf 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 Signed-off-by: Sage Weil --- diff --git a/src/ceph_common.sh b/src/ceph_common.sh index af2576b3cd49..4851a785e8f8 100644 --- a/src/ceph_common.sh +++ b/src/ceph_common.sh @@ -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"