diff options
author | Eric Hameleers <alien@slackware.com> | 2024-08-19 19:14:42 +0200 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2024-08-19 19:14:42 +0200 |
commit | 761a31e418d264edc4f021fb4f59a4780fcef3d1 (patch) | |
tree | 1d2107755004ce4d50fbac0a341d624b0c77cfd6 | |
parent | 98ea7b163d3a90d695e867bc64b23a913ec83731 (diff) | |
download | liveslak-761a31e418d264edc4f021fb4f59a4780fcef3d1.tar.gz liveslak-761a31e418d264edc4f021fb4f59a4780fcef3d1.tar.xz |
liveinit: get rid of usbwait, use a loop
Diffstat (limited to '')
-rw-r--r-- | liveinit.tpl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/liveinit.tpl b/liveinit.tpl index ffd6784..07eb089 100644 --- a/liveinit.tpl +++ b/liveinit.tpl @@ -422,10 +422,15 @@ fi # Sometimes the devices need extra time to be available. # A root filesystem on USB is a good example of that. -echo "${MARKER}: Sleeping $WAIT seconds to give slow USB devices some time." -sleep $WAIT -# Fire at least one blkid: -blkid 1>/dev/null 2>/dev/null +# Actually we are going to retry a few times for as long as needed: +for ITER in 1 2 3 4 5 6 ; do + echo "${MARKER}: Sleeping $WAIT seconds to give slow USB devices some time." + sleep $WAIT + # Fire one blkid to probe for readiness: + blkid -p 1>/dev/null 2>/dev/null + [ $? -eq 0 ] && break + echo "${MARKER}: No sign of life from USB device, you're on your own..." +done if [ "$RESCUE" = "" ]; then if [ $LOCALHD -eq 1 ]; then |