iPXE discussion forum
get DHCP/Option#67 inside a script - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: get DHCP/Option#67 inside a script (/showthread.php?tid=22639)



get DHCP/Option#67 inside a script - IBIT.ZEE - 2020-05-13 21:57

Inside a script...

How can I get the "Boot File Name" passed in DHCP option 67 AngelRolleyes

in this case can be "ipxe.efi", "undionly.kpxe", "ipxe.lkrn", etc. etc.


RE: get DHCP/Option#67 inside a script - NiKiZe - 2020-05-14 04:27

what about ${67} or ${filename} also run the config command and see what pop up


RE: get DHCP/Option#67 inside a script - IBIT.ZEE - 2020-05-14 19:32

hi nikize.... that option gives me the script name...
I want to know the name of the ipxe file
that executed the current script (ipxe.ipx, snponly-x86-64.efi, undionly.kpxe, etc. etc. )

better,,,
I just want to know (inside the script) if the current boot
was originated from BIOS or from EFI firmware
(i dont really need those ipxe file names...)


RE: get DHCP/Option#67 inside a script - NiKiZe - 2020-05-14 19:54

Did you try config command?
Hint there is platform containing pcbios or efi


RE: get DHCP/Option#67 inside a script - IBIT.ZEE - 2020-05-14 21:50

yes...
that was what I used
(when i realized i cannot grab the executing ipxe file name)

the snippet created is:

iseq ${platform} efi && set xPLT EFI ||
iseq ${platform} pcbios && set xPLT BIOS ||
isset ${platform} || set xPLT Unknown

;-)