From ce7ee72792e203ae04b7bc48a3ccd5b63bb9e224 Mon Sep 17 00:00:00 2001 From: Gary Lowell Date: Wed, 13 Mar 2013 23:39:34 -0700 Subject: [PATCH] ceph_common.sh: Fix sed regex in get_local_daemon_list In get_local_daemon_list() the sed expression trimming the cluster name from the host name was trimming too much if the host name contained hyphens. Signed-off-by: Gary Lowell --- src/ceph_common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ceph_common.sh b/src/ceph_common.sh index 76af12979211..cdc190f439fe 100644 --- a/src/ceph_common.sh +++ b/src/ceph_common.sh @@ -120,7 +120,7 @@ get_local_daemon_list() { if [ -d "/var/lib/ceph/$type" ]; then for i in `find /var/lib/ceph/$type -mindepth 1 -maxdepth 1 -type d -printf '%f\n'`; do if [ -e "/var/lib/ceph/$type/$i/sysvinit" ]; then - id=`echo $i | sed 's/.*-//'` + id=`echo $i | sed 's/[^-]*-//'` local="$local $type.$id" fi done -- 2.47.3