Fix off-by-one error in ipxe retry attempts
Change-Id: I36d0ec88d15c651f6b3236814c08f43e711f3231
This commit is contained in:
parent
e87628318a
commit
6dc1bad813
|
@ -14,27 +14,27 @@
|
|||
# https://github.com/danderson/netboot/blob/master/pixiecore/boot.ipxe
|
||||
#
|
||||
set attempts:int32 10
|
||||
set x:int32 0
|
||||
set x:int32 1
|
||||
|
||||
:loop
|
||||
:dhcploop
|
||||
dhcp || goto nodhcp
|
||||
isset ${filename} || goto nobootconfig
|
||||
goto boot
|
||||
|
||||
:nodhcp
|
||||
echo No DHCP response, retrying (attempt ${x}/${attempts}).
|
||||
sleep 1
|
||||
echo -n No DHCP response
|
||||
goto retry
|
||||
|
||||
:nobootconfig
|
||||
echo No filename option present, retrying (attempt ${x}/${attempts}).
|
||||
sleep 1
|
||||
echo -n No filename option present
|
||||
goto retry
|
||||
|
||||
:retry
|
||||
echo (attempt ${x}/${attempts}).
|
||||
iseq ${x} ${attempts} && goto fail ||
|
||||
inc x
|
||||
goto loop
|
||||
sleep 1
|
||||
goto dhcploop
|
||||
|
||||
:boot
|
||||
chain ${filename}
|
||||
|
|
Loading…
Reference in New Issue