diff options
author | Nishanth Aravamudan <nacc@linux.vnet.ibm.com> | 2015-08-19 14:05:43 -0700 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> | 2015-12-18 13:06:53 +1100 |
commit | f155a58a64c660e46e74123293482561b816a39a (patch) | |
tree | 9dd50fadc6c42cdbc0f34d28d67cac4653240946 /discover/network.c | |
parent | 32d3249e252fe201eb81155cbf3b800ce5cf88e0 (diff) | |
download | petitboot-f155a58a64c660e46e74123293482561b816a39a.zip petitboot-f155a58a64c660e46e74123293482561b816a39a.tar.gz |
discover: extend URL in UI to support auto-discovery
The URL field currently only supports loading a particular file for
static network configurations. But it makes sense in certain static
network configurations to 'auto-discover' a file like petitboot does
with DHCP -- based off the MAC address and IP. Extend
device_handler_process_url to take those as parameters, and toggle off
the URL ending in a '/' to indicate whether to 'auto-discover' or
directly load the specified URL.
Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com>
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Diffstat (limited to 'discover/network.c')
-rw-r--r-- | discover/network.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/discover/network.c b/discover/network.c index f763687..c072eec 100644 --- a/discover/network.c +++ b/discover/network.c @@ -374,7 +374,11 @@ static void configure_interface_static(struct network *network, if (config->static_config.url) { pb_log("config URL %s\n", config->static_config.url); device_handler_process_url(network->handler, - config->static_config.url); + config->static_config.url, + mac_bytes_to_string(interface->dev, + interface->hwaddr, + sizeof(interface->hwaddr)), + config->static_config.address); } return; |