Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso/hooks/archiso_loop_mnt
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2010-12-08 14:44:48 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2010-12-08 14:44:48 -0300
commitb72003d6453e6995a30eea49a088c01e514dc553 (patch)
tree22e935fc70f6fa336f991eee043cc8c01d785fc7 /archiso/hooks/archiso_loop_mnt
parent90794d7cddf1289323b7d8956bcc5c061126a2f9 (diff)
[archiso] Use poll_device() in _pxe_nbd and _loop_mnt hooks.
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'archiso/hooks/archiso_loop_mnt')
-rw-r--r--archiso/hooks/archiso_loop_mnt8
1 files changed, 6 insertions, 2 deletions
diff --git a/archiso/hooks/archiso_loop_mnt b/archiso/hooks/archiso_loop_mnt
index 0d5eba7..13f8743 100644
--- a/archiso/hooks/archiso_loop_mnt
+++ b/archiso/hooks/archiso_loop_mnt
@@ -9,8 +9,12 @@ run_hook () {
archiso_loop_mount_handler () {
newroot="${1}"
- while [ ! -b "${img_dev}" ]; do
- sleep 1
+ msg ":: Waiting for boot device..."
+ while ! poll_device ${img_dev} 30; do
+ echo "ERROR: boot device didn't show up after 30 seconds..."
+ echo " Falling back to interactive prompt"
+ echo " You can try to fix the problem manually, log out when you are finished"
+ launch_interactive_shell
done
msg "::: Setup a loop device from ${img_loop} located at device ${img_dev}"