summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle2020-07-28 23:13:27 +0000
committerDaniel Golle2020-07-29 09:19:22 +0000
commit12740336b315fdaccff8394d6e8538e951ad6764 (patch)
tree40433662fdbfc8d4fb4ae969e1d66bef59c06000
parent9d5fa0ae9962959d5088043fec281e96824ab46a (diff)
downloadprocd-12740336b315fdaccff8394d6e8538e951ad6764.tar.gz
uxc: fix create operation
The 'create' operation needs uxc to reload it's configuration, so after adding the container to uxc' persistent state tracking the follow-up call to create the run-time can find it. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--uxc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/uxc.c b/uxc.c
index d43ac3e..5d06aa1 100644
--- a/uxc.c
+++ b/uxc.c
@@ -637,6 +637,12 @@ errout:
return ret;
}
+static void reload_conf(void)
+{
+ blob_buf_free(&conf);
+ conf_load(false);
+}
+
int main(int argc, char **argv)
{
int ret = EINVAL;
@@ -718,8 +724,9 @@ int main(int argc, char **argv)
ret = uxc_set(argv[2], argv[3], autostart, true);
if (ret)
goto runtime_out;
- }
+ reload_conf();
+ }
ret = uxc_create(argv[2], false);
} else
goto usage_out;