Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
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
commit386c020a682631fe14895961b713b359d2f764cd (patch)
treec2cde1b3f0d0eb629074b056632ec15cca3bf4a2
parentb915eb670e251ff7995680bcfcc6676d55c470f0 (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>
-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