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

Add dhcp retries to embedded iPXE script: #169

Merged
merged 1 commit into from
Jul 26, 2024
Merged
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
16 changes: 14 additions & 2 deletions binary/script/embed.ipxe
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,22 @@ isset ${net${idx}/ip} && goto interfaces-loop-done || iseq ${idx} 50 && goto aut

:interfaces-loop-done
echo Booting from net${idx}...
autoboot net${idx}
set retry-max:int32 10
set count:int32 1
:retry-loop1
echo trying dhcp ( attempt ${count}/${retry-max} )
dhcp net${idx} && goto done1 || iseq ${count} ${retry-max} || inc count && goto retry-loop1
:done1
autoboot net${idx} || exit

:autoboot
autoboot
set retry-max:int32 10
set count:int32 1
:retry-loop2
echo trying dhcp ( attempt ${count}/${retry-max} )
dhcp && goto done2 || iseq ${count} ${retry-max} || inc count && goto retry-loop2
:done2
autoboot || exit

:boot-with-vlan
set idx:int32 0
Expand Down