]> git.ozlabs.org Git - petitboot/blobdiff - discover/device-handler.c
discover/paths: Add network jobs to queue
[petitboot] / discover / device-handler.c
index 5b7afd0d3f56d7be992d3725f757d80d2c2c412a..730be857f5e564fdfea8938dbfc134d1f3c679be 100644 (file)
@@ -19,6 +19,7 @@
 #include <url/url.h>
 #include <i18n/i18n.h>
 
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
@@ -360,6 +361,7 @@ void device_handler_reinit(struct device_handler *handler)
 
        /* Cancel any remaining async jobs */
        process_stop_async_all();
+       pending_network_jobs_cancel();
 
        /* free unresolved boot options */
        list_for_each_entry_safe(&handler->unresolved_boot_options,
@@ -1082,6 +1084,8 @@ int device_handler_dhcp(struct device_handler *handler,
                        _("Processing DHCP lease response (ip: %s)"),
                        event_get_param(event, "ip"));
 
+       pending_network_jobs_start();
+
        /* create our context */
        ctx = device_handler_discover_context_create(handler, dev);
        talloc_steal(ctx, event);
@@ -1406,6 +1410,8 @@ static void device_handler_reinit_sources(struct device_handler *handler)
                return;
        }
 
+       system_info_reinit();
+
        udev_reinit(handler->udev);
 
        network_shutdown(handler->network);