[ipxe-devel] How to get & use the iPXE local (current) path ?

Michael Brown mbrown at fensystems.co.uk
Wed Feb 27 10:07:19 UTC 2013


On Wednesday 27 Feb 2013 09:04:40 Gilles van Ruymbeke wrote:
> Is there a way to display and use the local (current) path used by iPXE ?
> Or in other words, what is name of the variable I should use to access
> or "show" the base path when a relative parameter is provided to chain ?
> cf iPXE forum topic: http://forum.ipxe.org/showthread.php?tid=6837
> Is this already possible (if yes how ?) to have a way to really extract
> the current path or this feature needs to be added to the iPXE code ?
> iPXE is a great project ! Thank you very much for your time and support.

The "current working URI" is held in the global variable "cwuri", but is not 
currently exposed to scripts via a ${cwuri} variable.

It could be added fairly easily, but only if there's a convincing case for why 
it would be useful.

> FYI:I am using the http protocol to navigate through the various menus
> and the "filename" variable always shows the initial dhcp data.

Yes; that's as designed.  If you want the ${filename} variable to reflect the 
URI of the current menu, then the best way would be to explicitly set it, 
e.g.:

  set filename http://...../next-menu
  chain -ar ${filename}

Michael



More information about the ipxe-devel mailing list