summaryrefslogtreecommitdiffstats
path: root/src/image/script.c
Commit message (Collapse)AuthorAgeFilesLines
* [script] Allow for DOS-style line endings in scriptsMichael Brown2009-06-031-3/+5
| | | | | | | | | | | | | | | Windows text editors such as Notepad tend to use CRLF line endings, which breaks gPXE's signature detection for script images. Since scripts are usually very small, they end up falling back to being detected as valid PXE executable images (since there are no signature checks for PXE executables). Executing text files as x86 machine code tends not to work well. Fix by allowing for any isspace() character to terminate the "#!gpxe" signature, and by ensuring that CR characters get stripped during command line parsing. Suggested-by: Shao Miller <Shao.Miller@yrdsb.edu.on.ca>
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [comboot] Allow for tail recursion of COMBOOT imagesMichael Brown2009-02-171-4/+1Star
| | | | | | | | | | | | Multi-level menus via COMBOOT rely on the COMBOOT program being able to exit and invoke a new COMBOOT program (the next menu). This works, but rapidly (within about five iterations) runs out of space in gPXE's internal stack, since each new image is executed in a new function context. Fix by allowing tail recursion between images; an image can now specify a replacement image for itself, and image_exec() will perform the necessary tail recursion.
* [image] Avoid claiming zero-length images as validMichael Brown2009-02-161-0/+6
| | | | | Both the script and PXE images types will claim a zero-length image. Inhibit this to avoid end-user surprises.
* [script] Remove arbitrary limit on script line lengthsMichael Brown2008-06-181-28/+19Star
|
* Various warnings fixups for OpenBSD with gcc-3.3.5.Michael Brown2007-12-071-1/+1
|
* Set current working URI to be that of the executable image whenMichael Brown2007-08-071-9/+1Star
| | | | | executing any image, not just a script. (This will enable pxelinux to use relative URIs, should it wish to.)
* Set current working URI equal to script URI during script execution.Michael Brown2007-08-021-1/+9
|
* Cope with non-newline-terminated scripts.Michael Brown2007-08-021-2/+3
| | | | Print error status using strerror().
* Scripts temporarily deregister themselves while executing. ThisMichael Brown2007-06-091-3/+16
| | | | | allows us to avoid execution loops without having to hack around the image registration order.
* Make DEBUG=script echo the commands as they are executedMichael Brown2007-01-121-0/+1
|
* Use systematic names for XXX_IMAGE.Michael Brown2007-01-121-0/+113
Add scripts as an image format (since it's trivial to do).