]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
initscripts: accept osd0 or osd.0, regardless of what conf uses
authorSage Weil <sage@newdream.net>
Thu, 22 Jul 2010 21:26:49 +0000 (14:26 -0700)
committerSage Weil <sage@newdream.net>
Thu, 22 Jul 2010 21:26:49 +0000 (14:26 -0700)
src/ceph_common.sh

index 6a3130d7e3baf16ccdbb4c6759870238040ae89e..173f5ab977b20e3c8fabe4cb2211b481048c2ddd 100644 (file)
@@ -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"