Subject: Sleeping for 1 second before after accessing the loop device in order to not fail when removing it right afterwards.

From: Daniel Baumann <[email-masked]>
Date: Sat, 27 Aug 2011 20:47:46 +0200

---
 functions/losetup.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/functions/losetup.sh b/functions/losetup.sh
index df7e2d2..4e4f2ff 100755
--- a/functions/losetup.sh
+++ b/functions/losetup.sh
@@ -16,6 +16,8 @@ Losetup ()
 
 	${LB_ROOT_COMMAND} ${LB_LOSETUP} "${DEVICE}" "${FILE}"
 	FDISK_OUT="$(${LB_FDISK} -l -u ${DEVICE} 2>&1)"
+
+	sleep 1
 	${LB_ROOT_COMMAND} ${LB_LOSETUP} -d "${DEVICE}"
 
 	LOOPDEVICE="$(echo ${DEVICE}p${PARTITION})"
-- 
cgit v1.0