From: Sage Weil Date: Fri, 15 Aug 2014 23:41:43 +0000 (-0700) Subject: init-ceph: don't use bashism X-Git-Tag: v0.85~30^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2270%2Fhead;p=ceph.git init-ceph: don't use bashism -z STRING the length of STRING is zero Signed-off-by: Sage Weil --- diff --git a/src/init-ceph.in b/src/init-ceph.in index 03d0930060bc..0ed77abab66a 100644 --- a/src/init-ceph.in +++ b/src/init-ceph.in @@ -182,7 +182,7 @@ done # if `--cluster` was not passed in, fallback to looking at the config name -if ! [[ -n "$cluster" ]]; then +if [ -z "$cluster" ]; then cluster=`echo $conf | awk -F'/' '{print $(NF)}' | cut -d'.' -f 1` else # if we were told to use a given cluster name then $conf needs to be updated