From 0ff40f153aaad924d12f044913cb3a47f888639a Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Wed, 8 Dec 2010 14:44:48 -0300 Subject: [archiso] Use poll_device() in _pxe_nbd and _loop_mnt hooks. Signed-off-by: Gerardo Exequiel Pozzi --- archiso/hooks/archiso_pxe_nbd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'archiso/hooks/archiso_pxe_nbd') diff --git a/archiso/hooks/archiso_pxe_nbd b/archiso/hooks/archiso_pxe_nbd index 9f47116..b36b05d 100644 --- a/archiso/hooks/archiso_pxe_nbd +++ b/archiso/hooks/archiso_pxe_nbd @@ -64,8 +64,12 @@ archiso_pxe_nbd_mount_handler () { # Module autoloading like with loop devices does not work, doing manually... modprobe nbd 2> /dev/null - while [ ! -b /dev/nbd0 ]; do - sleep 1 + msg ":: Waiting for boot device..." + while ! poll_device /dev/nbd0 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 NBD from ${nbdserver} at /dev/nbd0" -- cgit v1.2.3-70-g09d2