]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
init-ceph.in: allow case-insensitive true in `osd crush update on start' 7943/head
authorEric Cook <llua@gmx.com>
Sat, 5 Mar 2016 09:51:41 +0000 (04:51 -0500)
committerEric Cook <llua@gmx.com>
Sat, 5 Mar 2016 09:51:41 +0000 (04:51 -0500)
I noticed this when openstack/puppet-ceph sliently converted my 'true'
to 'True' in ceph.conf.

Signed-off-by: Eric Cook llua@gmx.com
src/init-ceph.in

index 96111985f6d9ab734a96087a4b20172960dc2046..731d1032b60e956c28c5b5320e3c4296421c87c5 100755 (executable)
@@ -398,7 +398,7 @@ for name in $what; do
 
            if [ "$type" = "osd" ]; then
                get_conf update_crush "" "osd crush update on start"
-               if [ "${update_crush:-1}" = "1" -o "${update_crush:-1}" = "true" ]; then
+               case "${update_crush:-1}" in 1|[Tt][Rr][Uu][Ee])
                    # update location in crush
                    get_conf osd_location_hook "$BINDIR/ceph-crush-location" "osd crush location hook"
                    osd_location=`$osd_location_hook --cluster $cluster --id $id --type osd`
@@ -410,7 +410,7 @@ for name in $what; do
                        EXIT_STATUS=$ERR
                        continue
                    fi
-               fi
+               esac
            fi
 
            echo Starting Ceph $name on $host...