From 0d6d1aa7e0c5e0b5f99c9b548a1f890c511b4299 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 15 Aug 2014 16:41:43 -0700 Subject: [PATCH] init-ceph: don't use bashism -z STRING the length of STRING is zero Signed-off-by: Sage Weil --- src/init-ceph.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init-ceph.in b/src/init-ceph.in index 03d0930060bcc..0ed77abab66a8 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 -- 2.39.5