[ipxe-devel] iPXE scripting enhancements

Michael Brown mcb30 at ipxe.org
Mon Nov 22 02:04:49 UTC 2010


iPXE commands can now contain short-circuit logical operators such as "&&" and 
"||".  For example,

  dhcp net0 || set net0/ip 192.168.0.2   # Use static IP if DHCP fails

This makes it relatively easy to handle one of the common requests: how to 
avoid terminating a script when a command fails.  You can achieve this by 
simply appending "||" to the command line, e.g.

  dhcp net0 ||    # Will not terminate script if DHCP fails

Hope this is useful to someone.

Michael



More information about the ipxe-devel mailing list