Hello all, I was reading http://www.etherboot.org/wiki/appnotes/autobootchainurl, and figured that as long as I was going to be modifying the code I might as well try a cleaner solution. Attached to this message is a patch that makes the following changes:
1) Allow the "dhcp" command to accept a list of interfaces and to try them in order until it succeeds, e.g.: gPXE> dhcp net0 net1 net2 In order to preserve the original syntax of the command, this will fail on an unknown interface name: gPXE> dhcp foo net0 No such interface: foo gPXE> The "-c" flag allows it to continue: gPXE> dhcp -c foo net0 No such interface: foo DHCP (net0 xx:xx:xx:xx:xx:xx).... ok gPXE> 2) If given the single parameter "any" as an interface name, iterate over all known interfaces in a manner similar to autoboot(): gPXE> dhcp any DHCP (net0 xx:xx:xx:xx:xx:xx)........ Connection timed out (...) Could not configure net0: Connection timed out (...) DHCP (net1 xx:xx:xx:xx:xx:xx).... ok gPXE> I think this manages to preserve the syntax of the existing "dhcp" command while making the magic of autoboot available to gpxe scripts. Please let me know if you have any comments. This code has only had limited testing, and I'm not terribly familiar with the gPXE code base. Please excuse any stylistic problems; I'd be happy to fix anything that needs fixing. Cheers, -- Lars
dhcp_multiple_interface.patch
Description: Binary data
_______________________________________________ gPXE mailing list [email protected] http://etherboot.org/mailman/listinfo/gpxe
