diff options
author | Michael Brown <mcb30@ipxe.org> | 2011-03-07 22:02:07 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2011-03-07 22:28:31 +0000 |
commit | b2332d511807b87bd71cf73acaaf48e671d71c9d (patch) | |
tree | fde829da1d96d26c6d1047c0a41cc2aa8558df1c /src/image/script.c | |
parent | 202cf094ebcbea4dec43e57ae29a3bbe808807e4 (diff) | |
download | ipxe-b2332d511807b87bd71cf73acaaf48e671d71c9d.tar.gz |
[prefix] Allow iPXE's own command line to be executed as a script
Some prefixes (e.g. .lkrn) allow a command line to be passed in to
iPXE. At present, this command line is ignored.
If a command line is provided, treat it as an embedded script (without
an explicit "#!ipxe" magic marker). This allows for patterns of
invocation such as
title iPXE
kernel /boot/ipxe.lkrn dhcp && \
sanboot iscsi:10.0.4.1::::iqn.2010-04.org.ipxe.dolphin:storage
Here GRUB is instructed to load ipxe.lkrn with an embedded script
equivalent to
#!ipxe
dhcp
sanboot iscsi:10.0.4.1::::iqn.2010-04.org.ipxe.dolphin:storage
This can be used to effectively vary the embedded script without
having to rebuild ipxe.lkrn.
Originally-implemented-by: Dave Hansen <dave@sr71.net>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/image/script.c')
-rw-r--r-- | src/image/script.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/image/script.c b/src/image/script.c index b819693d3..572eac718 100644 --- a/src/image/script.c +++ b/src/image/script.c @@ -36,6 +36,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <ipxe/image.h> #include <ipxe/shell.h> #include <usr/prompt.h> +#include <ipxe/script.h> /** Currently running script * |