[gPXE] environment variable expansion in 'filename'?

Jarrod Johnson jarrod.b.johnson at gmail.com
Thu May 20 14:22:18 EDT 2010


On Thu, May 20, 2010 at 1:50 PM, Miller, Shao
<Shao.Miller at yrdsb.edu.on.ca>wrote:

> Good day Jarrod,
>
> How about putting 'http://central_server/some_script.gpxe' in as the
> filename?  Then some_script.gpxe could go:
>
> #!gpxe
> chain http://${next-server}/filename
>
> The ${} expansion is only applied for scripts and CLI at this time.
>
> If you are handing out a different next-server option, why is it more
> difficult to hand out an explicit filename option including the local
> server?
>
> - Shao Miller
>
So, currently, that's how it goes and I used fixed-address declarations so
looking up the 'best' next-server isn't too hard.  Without fixed-address,
things start getting tricky based on what I'm trying to do.  While still
possible for me to externally coordinate what network the booting device
will land in, it would be much simpler for my purposes to inherit
'next-server' from the 'subnet {}' portion of dhcp, but I need to specify
per-node paths at a host declaration level.  Things get hypothetically
trickier if netboot with DHCPv6 comes into life following the rule in DHCPv6
where DUID is constant regardless of interface when I'm dealing with
multihomed devices.  There I might have a single host declaration that has
to describe two network relationships, but that's all theoretical.

On a related note, is it horribly objectionable or a bad idea for
expand_command  from exec.c to be called from boot_next_server_and_filename
from autoboot.c?  Failing that I'll contemplate an embedded script, but lack
of conditionals is gPXE scripting could prove to be a touchy thing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://etherboot.org/pipermail/gpxe/attachments/20100520/dd6488bd/attachment.html 


More information about the gPXE mailing list