The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to detect available download protocols or build options inside an iPXE script?
2016-02-05, 01:08
Post: #1
How to detect available download protocols or build options inside an iPXE script?
Is it possible, within an iPXE script, to base a conditional statement (or variable value) on whether or not a download protocol is available in the iPXE instance that is running?

IE: Use HTTP if available, if not, use a TFTP url for network booting, something like:

dhcp
isset ${19:integer} || goto noHttp
set url http://...
goto gotProto
:noHttp
set url tftp://....
:gotProto
echo Booting using ${url}
boot ${url}

Since DHCP option 19 is the feature indicator option for ipxe.http, but this doesn't seem to work, perhaps because the option is only set when iPXE is sending the DHCP request, but in this example it's testing the server response (?)

I know I could first try the HTTP and then fall back on the TFTP statement if it fails, but the output of this is messy.

Rob
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
How to detect available download protocols or build options inside an iPXE script? - robzr - 2016-02-05 01:08



User(s) browsing this thread: 1 Guest(s)