Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso/hooks
diff options
context:
space:
mode:
authorSimo Leone <simo@archlinux.org>2008-11-13 03:49:25 -0600
committerSimo Leone <simo@archlinux.org>2008-11-13 03:49:25 -0600
commit460b0f1edc1596cbd0dc5df5671d227a0fc1b780 (patch)
tree775545b25e9ebb553c5110b174d31154c6d4514f /archiso/hooks
parent7f1a1411365309d1d50e1eea5935a29d2debab8b (diff)
Fix loop device mounting
Take away redirects so error messages are readable, and wait to make sure udev creates the loopback devices before we try to use them. Signed-off-by: Simo Leone <simo@archlinux.org>
Diffstat (limited to 'archiso/hooks')
-rw-r--r--archiso/hooks/archiso6
1 files changed, 5 insertions, 1 deletions
diff --git a/archiso/hooks/archiso b/archiso/hooks/archiso
index c8b6a1b..d3d8736 100644
--- a/archiso/hooks/archiso
+++ b/archiso/hooks/archiso
@@ -12,7 +12,11 @@ _mnt_squashfs()
msg "::: Adding new union branch: ${1}"
/bin/modprobe -q loop >/dev/null 2>&1
mkdir -p "/tmpfs/mnt/loop${LOOP_NUM}"
- if ! /bin/losetup "/dev/loop${LOOP_NUM}" ${1} > /dev/null 2>&1; then
+ # sometimes it takes udev a while to create device nodes
+ until [ -e "/dev/loop${LOOP_NUM}" ]; do
+ sleep 1
+ done
+ if ! /bin/losetup "/dev/loop${LOOP_NUM}" ${1}; then
echo "ERROR: Cannot mount loop device /dev/loop${LOOP_NUM}"
break
fi