[gPXE-devel] Minor Scripting Improvements
J.H.
warthog19 at eaglescrag.net
Tue Mar 16 21:02:05 EDT 2010
On 03/06/2010 08:53 PM, Shao Miller wrote:
> J.H. wrote:
>>
>> Is there a way, from say syslinux, to set a gPXE variable like ${again}
>> that your making reference to?
>>
>
> Absolutely. Syslinux' gpxecmd.c32 can execute arbitrary gPXE commands
> from the PXELINUX system (if gPXE is resident).
>
> LABEL breakloop
> COM32 gpxecmd.c32
> APPEND set again 0
>
> If this useful for you, John?
>
> - Shao Miller
(sorry to get back to this so late, just popping off the e-mail stack
and this finally made it back to the top)
What I need to do, or what would make a lot of sense to me is the following:
1 : Load gPXE
10 : try dhcp
20 : Chain to syslinux
20 : Syslinux set a variable in gPXE
30 : Syslinux exits
40 : if variable set - we successfully made it to syslinux - gPXE can exit
50 : if not variable set continue
60 : try static
70 : Chain to syslinux
80 : Syslinux set a variable in gPXE
90 : Syslinux exits
100: if variable set - we successfully made it to syslinux - gPXE can exit
110: if not variable goto 10
I *THINK* all I really need is to have some concept of an if statement,
even if it was nothing but if 0|1 I.E.
if variable <gpxe command> (or <gpxe command> if variable)
I just really need a simple mechanism to get a return code of some sort,
using gpxecmd.c32 should work, if I use it as the default or a custom
com32 module can be written that does what I need (just need to be able
to set the variable in gPXE)
I'm trying to think of a way to abuse the loopif construct suggested
here to get what I'm looking for now too ;-) but that might be a bit
more complicated.
Anyway hopefully this is helpful in what I'm kinda looking for.
- John 'Warthog9' Hawley
More information about the gPXE-devel
mailing list