Skip to content

Commit

Permalink
Autoboot from the interface that has obtained an IP address through D…
Browse files Browse the repository at this point in the history
…HCP (#84)

Modify the ipxe script to identify and autoboot from the interface that has successfully obtained an IP address through DHCP. Implementing this solution will result in a faster boot process and improved overall efficiency.

Fixes: #83

## Description



## Why is this needed



Fixes: #83

## How Has This Been Tested?





## How are existing users impacted? What migration steps/scripts do we need?





## Checklist:

I have:

- [ ] updated the documentation and/or roadmap (if required)
- [ ] added unit or e2e tests
- [ ] provided instructions on how to upgrade
  • Loading branch information
mergify[bot] committed Jun 3, 2023
2 parents b331219 + 38d5e1d commit 421f8c1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions binary/script/embed.ipxe
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE command line... && sh
set vlan-id ${43.116:string}
isset ${vlan-id} && goto boot-with-vlan ||

:iterate-interfaces
set idx:int32 0
:interfaces-loop
isset ${net${idx}/ip} && goto interfaces-loop-done || iseq ${idx} 50 && goto autoboot || inc idx && goto interfaces-loop

:interfaces-loop-done
echo Booting from net${idx}...
autoboot net${idx}

:autoboot
autoboot

Expand Down

0 comments on commit 421f8c1

Please sign in to comment.