]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
initscript: make sure cmdline instance exists
authorSage Weil <sage@newdream.net>
Mon, 18 May 2009 19:01:21 +0000 (12:01 -0700)
committerSage Weil <sage@newdream.net>
Mon, 18 May 2009 19:01:21 +0000 (12:01 -0700)
src/ceph_common.sh

index e45926cd3a7800c91c3fc423e862fa6d01acc73c..4667713d65daa00e31a4fe48be8e445632d2f002 100644 (file)
@@ -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