Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hooks/waitForBooting.sh: retry upon OCR failure #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions hooks/waitForBooting.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@


#!/bin/sh

echo "====> Wait for Boot Multi user"
if bash vbox.sh waitForText $VM_OS_NAME "Boot Multi user" 10 ; then
echo "====> OK, enter"
bash vbox.sh enter
fi


try_counter=0
while ! bash vbox.sh waitForText "$VM_OS_NAME" "Boot Multi user" 10 ; do
if [ "$try_counter" -ge 10 ] ; then
echo "====> Too many tries... exiting."
exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't need to "exit" here.
If we don't find the booting menu, it's ok to just continue.

fi
echo "====> Timed out, trying again..."
try_counter=$((1+try_counter))
sleep 1
done

echo "====> OK, enter"
bash vbox.sh enter