From: Sage Weil Date: Thu, 22 Jul 2010 21:26:49 +0000 (-0700) Subject: initscripts: accept osd0 or osd.0, regardless of what conf uses X-Git-Tag: v0.21~71 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=de9262e995085e892df481bb5607b39510a616a7;p=ceph.git initscripts: accept osd0 or osd.0, regardless of what conf uses --- diff --git a/src/ceph_common.sh b/src/ceph_common.sh index 6a3130d7e3baf..173f5ab977b20 100644 --- a/src/ceph_common.sh +++ b/src/ceph_common.sh @@ -122,14 +122,15 @@ 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$"` + id=`echo $f | cut -c 4- | sed 's/\\.//'` + all=`$CCONF -c $conf -l $type | egrep -v "^$type$"` case $f in mon | osd | mds) - what="$what $bit" + what="$what $all" ;; *) - if echo " " $bit " " | grep -v -q " $f "; then - echo "$0: $type '$f' not found ($conf defines "$bit")" + if echo " $all " | egrep -v -q "( $type$id | $type.$id )"; then + echo "$0: $type.$id not found ($conf defines \"$all\")" exit 1 fi what="$what $f"