1 #!ipxe 2 echo Sleeping 10 seconds to wait for STP/Powersave to switchoff and on 3 sleep 10 4 isset ${net0/mac} && ifopen net0 && dhcp net0 || goto dhcpnet1 5 echo Received DHCP answer on interface net0 && goto proxycheck 6 7 :dhcpnet1 8 isset ${net1/mac} && ifopen net1 && dhcp net1 || goto dhcpnet2 9 echo Received DHCP answer on interface net1 && goto proxycheck 10 11 :dhcpnet2 12 isset ${net2/mac} && ifopen net2 && dhcp net2 || goto dhcpall 13 echo Received DHCP answer on interface net2 && goto proxycheck 14 15 :dhcpall 16 dhcp && goto proxycheck || goto dhcperror 17 18 :dhcperror 19 prompt --key s --timeout 10000 DHCP failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot 20 21 :proxycheck 22 isset ${proxydhcp/next-server} && set next-server ${proxydhcp/next-server} || goto nextservercheck 23 24 :nextservercheck 25 isset ${next-server} && goto netboot || goto setserv 26 27 :setserv 28 echo -n Please enter tftp server: && read next-server && goto netboot || goto setserv 29 30 :netboot 31 chain tftp://${next-server}/default.ipxe || 32 prompt --key s --timeout 10000 Chainloading failed, hit 's' for the iPXE shell; reboot in 10 seconds && shell || reboot