summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2011-08-27 20:47:46 +0200
committerDaniel Baumann <daniel@debian.org>2011-08-27 20:47:46 +0200
commit11840c8fc528512a0646406b66f5ea6f7a7b1408 (patch)
treef730d38c3d56488bc97cf8be69e455b890e04a19
parenta8eb93e487ba855064da81aaa7a473e337512233 (diff)
downloadlive-build-11840c8fc528512a0646406b66f5ea6f7a7b1408.zip
live-build-11840c8fc528512a0646406b66f5ea6f7a7b1408.tar.gz
Sleeping for 1 second before after accessing the loop device in order to not fail when removing it right afterwards.
-rwxr-xr-xfunctions/losetup.sh2
1 files changed, 2 insertions, 0 deletions
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})"