[ipxe-devel] ifwait command

Robin Smidsrød robin at smidsrod.no
Mon Apr 4 08:11:14 UTC 2016

On 02.04.2016 00:13, Gerardo Richarte wrote:
> Hi, I've added a new command, ifwait.
> I needed the command to do netboot with static ip addresses. Bringing
> up the interfaces take pretty long in my board, and instead of adding
> a static delay I borrowed some code from other commands (dhcp) and
> hacked this command which is no more than a single line of code but
> pretty useful.
> This is the script where I use it:
> $ cat http_boot.ipxe
> #!ipxe
> ifwait net1 ||
> echo Trying to boot from net1
> set net1/ip ||
> ifopen net1 ||
> chain -t 2000 ||
> ifclose net1 ||

Why don't you just switch the ifopen net1 and set net1/ip lines
around? That should ensure that ifopen takes care of initializing your
network interface properly and it is usable when you do the chain.

-- Robin

More information about the ipxe-devel mailing list