From: Gary Lowell Date: Thu, 14 Mar 2013 06:39:34 +0000 (-0700) Subject: ceph_common.sh: Fix sed regex in get_local_daemon_list X-Git-Tag: v0.59~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ce7ee72792e203ae04b7bc48a3ccd5b63bb9e224;p=ceph.git 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 --- 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