uxc: don't restart containers when mount shows up
[project/procd.git] / uxc.c
diff --git a/uxc.c b/uxc.c
index d1afc4c69b3a594e78757802a09b040a4bfcfbe0..b801d7f906574be3a43863d943a7c7773fecd100 100644 (file)
--- a/uxc.c
+++ b/uxc.c
@@ -742,6 +742,7 @@ static void block_cb(struct ubus_request *req, int type, struct blob_attr *msg)
 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;
@@ -759,6 +760,10 @@ static int uxc_boot(void)
                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]))