[ipxe-devel] [gPXE] Identifier strings with blank spaces
shedis
shedis at gmail.com
Fri Feb 1 17:11:27 UTC 2013
Excelente! Thanks Michael, it worked perfectly well :-)
On Feb 1, 2013, at 3:55 AM, Michael Brown wrote:
> On Thursday 31 Jan 2013 18:15:23 shedis wrote:
>> i have been trying the boot systems using their smbios information. As a
>> starting point i used "Network booting by mac address"
>> (http://www.etherboot.org/wiki/appnotes/bootbymacaddress) link.
>>
>> I have a file: http://10.10.5.10/gpxe/boot.gpxe
>>
>> which contains:
>> #!gpxe
>> chain
>> http://10.10.5.10/gpxe/boot.txt?mac=${net0/mac}&manufact=${smbios/1.4.0:st
>> ring}&serialno=${smbios/1.7.0:string}&model=${smbios/1.5.0:string}&req=boot
>> me
>>
>> When processing above chain command, request is sent to the web server with
>> proper identifier substitution except for model=${smbios/1.5.0:string}.
>> Since model information within smbios contains string with spaces between
>> words e.g. "HP ElliteBook 8560p" the url that get fetched looks liks
>> xxxxxxx&model=HP&. Also the parameters after "model" like stat=ok gets
>> truncated.
>
> First, upgrade to iPXE (http://ipxe.org) - gPXE is no longer maintained.
>
> You can then use the :uristring setting type, e.g.:
>
> ${smbios/1.4.0:uristring}
>
> This will URI-encode any special characters (including spaces), which should
> solve your problem.
>
> Michael
More information about the ipxe-devel
mailing list