]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_common.sh: Fix sed regex in get_local_daemon_list
authorGary Lowell <glowell@inktank.com>
Thu, 14 Mar 2013 06:39:34 +0000 (23:39 -0700)
committerSage Weil <sage@inktank.com>
Thu, 14 Mar 2013 17:02:14 +0000 (10:02 -0700)
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 <gary.lowell@inktank.com>
src/ceph_common.sh

index 76af12979211a4aec75b97da4ba0bd97ffda50f6..cdc190f439fe15c3ed881a7044def1ada408a5e9 100644 (file)
@@ -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