From de0611c26005fcb15c756537f571933b64d1d125 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 18 May 2009 12:01:21 -0700 Subject: [PATCH] initscript: make sure cmdline instance exists --- src/ceph_common.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ceph_common.sh b/src/ceph_common.sh index e45926cd3a780..4667713d65daa 100644 --- a/src/ceph_common.sh +++ b/src/ceph_common.sh @@ -65,12 +65,17 @@ get_name_list() { what="" for f in "$orig"; do + type=`echo $f | cut -c 1-3` # e.g. 'mon', if $item is 'mon1' + bit=`$CCONF -c $conf -l $type | egrep -v "^$type$"` case $f in mon | osd | mds) - bit=`$CCONF -c $conf -l $f | egrep -v "^$f$"` what="$what $bit" ;; *) + if echo " $bit " | grep -v -q " $f "; then + echo "$0: $type '$f' not found ($conf defines $bit)" + exit 1 + fi what="$what $f" ;; esac -- 2.39.5