Well, if anyone wants it, here is my stab at adding variable expansion to the filename field.  It doesn&#39;t work with relative tftp uris because I don&#39;t care and I don&#39;t feel like reworking how that buf array is alloced.  Do with it as you will or will not.  The declaration of expand_command probably should be in a header instead of just dumped in, but this is how I got what I wanted with adding three lines of code and changing one.  I&#39;m sure even with that I made enough dubious moves to warrant a rethought, but its something...<br>
<br><div class="gmail_quote">On Thu, May 20, 2010 at 2:44 PM, Miller, Shao <span dir="ltr">&lt;<a href="mailto:Shao.Miller@yrdsb.edu.on.ca">Shao.Miller@yrdsb.edu.on.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I&#39;m forwarding your request on to the gPXE Developers&#39; mailing-list, since I think the folks there would be well-suited to voice opinions on your request.  - Shao<br>
<div class="im"><br>
________________________________________<br>
From: Jarrod Johnson [mailto:<a href="mailto:jarrod.b.johnson@gmail.com">jarrod.b.johnson@gmail.com</a>]<br>
</div>Sent: Thursday, May 20, 2010 14:41<br>
To: Miller, Shao<br>
Cc: <a href="mailto:gpxe@etherboot.org">gpxe@etherboot.org</a><br>
Subject: Re: FW: [gPXE] environment variable expansion in &#39;filename&#39;?<br>
<div><div></div><div class="h5"><br>
Would you mind a patch to add the expand_command to autoboot.c?<br>
On Thu, May 20, 2010 at 2:31 PM, Miller, Shao &lt;<a href="mailto:Shao.Miller@yrdsb.edu.on.ca">Shao.Miller@yrdsb.edu.on.ca</a>&gt; wrote:<br>
Hey again Jarrod,<br>
<br>
I&#39;m forwarding this on to the gPXE list.<br>
<br>
gPXE actually does support conditionals right now, though they&#39;re extremely icky.  See &quot;crazy scripting library&quot; thread[1] or &quot;fall-back filename&quot; thread[2].  However, there doesn&#39;t seem to be much interest, much time, much support, much discussion, or some combination thereof for a couple of [relatively] recent proposals to enhance gPXE&#39;s scripting/CLI system[3].<br>

<br>
- Shao Miller<br>
<br>
[1] <a href="http://etherboot.org/pipermail/gpxe/2010-March/000646.html" target="_blank">http://etherboot.org/pipermail/gpxe/2010-March/000646.html</a><br>
[2] <a href="http://etherboot.org/pipermail/gpxe/2010-April/000846.html" target="_blank">http://etherboot.org/pipermail/gpxe/2010-April/000846.html</a><br>
[3] <a href="http://etherboot.org/pipermail/gpxe-devel/2010-March/000102.html" target="_blank">http://etherboot.org/pipermail/gpxe-devel/2010-March/000102.html</a><br>
<br>
________________________________________<br>
From: Jarrod Johnson [mailto:<a href="mailto:jarrod.b.johnson@gmail.com">jarrod.b.johnson@gmail.com</a>]<br>
Sent: Thursday, May 20, 2010 14:19<br>
To: Miller, Shao<br>
Subject: Re: [gPXE] environment variable expansion in &#39;filename&#39;?<br>
<br>
So, currently, that&#39;s how it goes and I used fixed-address declarations so looking up the &#39;best&#39; next-server isn&#39;t too hard.  Without fixed-address, things start getting tricky based on what I&#39;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 &#39;next-server&#39; from the &#39;subnet {}&#39; 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&#39;m dealing with multihomed devices.  There I might have a single host declaration that has to describe two network relationships, but that&#39;s all theoretical.<br>

<br>
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&#39;ll contemplate an embedded script, but lack of conditionals is gPXE scripting could prove to be a touchy thing.<br>

<br>
<br>
</div></div></blockquote></div><br>