summaryrefslogtreecommitdiffstats
path: root/discover/network.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-03-23 17:42:37 +1100
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-07-11 14:32:26 +1000
commit5314cebf5fe766bdca6c779e785b8dfaa3808142 (patch)
tree133934cb709b765a7c1acd06433328fc53cc12bd /discover/network.c
parent1ac262ed5224463c01525c680d1f58f7df48b943 (diff)
downloadtalos-petitboot-5314cebf5fe766bdca6c779e785b8dfaa3808142.tar.gz
talos-petitboot-5314cebf5fe766bdca6c779e785b8dfaa3808142.zip
discover/paths: Add network jobs to queue
Load tasks that start before the network is available will fail. Rather than just fail these tasks, add them to a queue that is processed once the network is ready. This helps users who try to request files early in setup, as well as very early running load tasks. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'discover/network.c')
-rw-r--r--discover/network.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/discover/network.c b/discover/network.c
index 8ca4561..5035b7c 100644
--- a/discover/network.c
+++ b/discover/network.c
@@ -23,6 +23,7 @@
#include "sysinfo.h"
#include "platform.h"
#include "device-handler.h"
+#include "paths.h"
#define HWADDR_SIZE 6
#define PIDFILE_BASE (LOCAL_STATE_DIR "/petitboot/")
@@ -489,6 +490,8 @@ static void configure_interface(struct network *network,
} else if (config->method == CONFIG_METHOD_STATIC) {
configure_interface_static(network, interface, config);
+ /* Nothing left to do for static interfaces */
+ pending_network_jobs_start();
}
interface->state = IFSTATE_CONFIGURED;
OpenPOWER on IntegriCloud