]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[cmdline] Add trivial logical operators to iPXE command lines
authorMichael Brown <mcb30@ipxe.org>
Mon, 22 Nov 2010 01:47:07 +0000 (01:47 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 22 Nov 2010 01:47:07 +0000 (01:47 +0000)
commit9ba988809d2bae422fe36d5e6c8563b3cd6cac55
tree00a06c6a9d9b4702f3c31e5924b82b78c5ba6146
parentb91116e072c1dfad4f4acfd3dc89347ea5dd913c
[cmdline] Add trivial logical operators to iPXE command lines

Make the "||" and "&&" operators available within iPXE commands.  For
example:

   dhcp net0 || set net0/ip 192.168.0.2

would attempt to acquire an IP address via DHCP, falling back to a
static address if DHCP fails.

As a side-effect, comments may now be appended to any line.  For
example:

  dhcp net0 || set net0/ip 192.168.0.2   # Try DHCP first, then static

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/exec.c