From b419924b18b08d74378b3e37e4b5a7fb8a6a7be1 Mon Sep 17 00:00:00 2001 From: Laurent Barbe Date: Thu, 22 Aug 2013 12:12:49 +0200 Subject: [PATCH] init-rbdmap: fix error on stop rbdmap Avoid an error on stop service if many /dev/rbd* exist. Signed-off-by: Laurent Barbe --- src/init-rbdmap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init-rbdmap b/src/init-rbdmap index 54554ae40d74f..e04424fcd7816 100755 --- a/src/init-rbdmap +++ b/src/init-rbdmap @@ -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