procd triggers 'uxc boot' every time a new mount shows up which results
in containers to be restarted which had already been run and may have
ended reguarly, crashed or deliberately stopped.
As the intention of 'uxc boot' is to start containers which were still
waiting for volumes to become ready, really do only that.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
static int uxc_boot(void)
{
struct blob_attr *cur, *tb[__CONF_MAX];
+ struct runtime_state *s;
int rem, ret = 0;
char *name;
unsigned int id;
if (!tb[CONF_NAME] || !tb[CONF_PATH] || !tb[CONF_AUTOSTART] || !blobmsg_get_bool(tb[CONF_AUTOSTART]))
continue;
+ s = avl_find_element(&runtime, blobmsg_get_string(tb[CONF_NAME]), s, avl);
+ if (s)
+ continue;
+
/* make sure all volumes are ready before starting */
if (tb[CONF_VOLUMES])
if (checkvolumes(tb[CONF_VOLUMES]))