ui: add URL for static configurations to load a specified file
[petitboot] / discover / network.c
index 0dad087bb4199a3d2ed15510bad1f0b43cc1f1ab..f763687f8b53bbb8c57b14f1c0abe63e171e147b 100644 (file)
@@ -336,7 +336,8 @@ static void configure_interface_dhcp(struct interface *interface)
        return;
 }
 
-static void configure_interface_static(struct interface *interface,
+static void configure_interface_static(struct network *network,
+               struct interface *interface,
                const struct interface_config *config)
 {
        int rc;
@@ -370,6 +371,12 @@ static void configure_interface_static(struct interface *interface,
                                interface->name);
        }
 
+       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);
+       }
+
        return;
 }
 
@@ -438,7 +445,7 @@ static void configure_interface(struct network *network,
                configure_interface_dhcp(interface);
 
        } else if (config->method == CONFIG_METHOD_STATIC) {
-               configure_interface_static(interface, config);
+               configure_interface_static(network, interface, config);
        }
 }