]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init-rbdmap: fix error on stop rbdmap 525/head
authorLaurent Barbe <laurent@ksperis.com>
Thu, 22 Aug 2013 10:12:49 +0000 (12:12 +0200)
committerLaurent Barbe <laurent@ksperis.com>
Thu, 22 Aug 2013 10:12:49 +0000 (12:12 +0200)
Avoid an error on stop service if many /dev/rbd* exist.

Signed-off-by: Laurent Barbe <laurent@ksperis.com>
src/init-rbdmap

index 54554ae40d74f12138a48463795e6b093cdc9607..e04424fcd7816001d8ff15f16304077776865a42 100755 (executable)
@@ -68,7 +68,7 @@ do_unmap() {
                umount $MNT
        done 
        # Unmap all rbd device
-       if [ -b /dev/rbd[0-9]* ]; then
+       if ls /dev/rbd[0-9]* >/dev/null 2>&1; then
                for DEV in /dev/rbd[0-9]*; do
                        log_progress_msg $DEV
                        rbd unmap $DEV