Update boot.cfg.j2 to use custom ${boot_domain}#1637
Conversation
fix local-vars.ipxe can't overwrite ${boot_domain}
There was a problem hiding this comment.
Pull request overview
This PR enables the boot_domain variable to be overridden via local-vars.ipxe, fixing an issue where custom boot domains couldn't be set locally. The change uses conditional assignment (isset ${boot_domain} ||) to only set the default value if the variable hasn't already been defined.
- Converted the unconditional
set boot_domainassignment to a conditionalisset ${boot_domain} || set boot_domainpattern - Updated the comment to clarify that this variable can be overridden in local-vars.ipxe
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # set location of custom boot domain, override in local-vars.ipxe | ||
| isset ${boot_domain} || set boot_domain {{ boot_domain }} |
There was a problem hiding this comment.
While the boot_domain variable can now be overridden in local-vars.ipxe (similar to live_endpoint and boot_timeout), it should also be documented in the local-vars.ipxe.j2 template file. Consider adding an example entry like:
Sets the boot domain
#set boot_domain boot.mydomain.com
This would be consistent with how live_endpoint (line 17) and boot_timeout (line 20) are documented in roles/netbootxyz/templates/local-vars.ipxe.j2.
fix local-vars.ipxe can't overwrite ${boot_domain}
details: https://github.com/orgs/netbootxyz/discussions/1451