From b4d10cbadebc4ebd1acd6fd9de7f4d6d15bdb596 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 4 Oct 2023 18:48:13 +0200 Subject: [PATCH] Always ensure /run/finit/system exists before saving runtime service This fixes the regression in the tests, which runs in a very stripped down world without tmpfiles.d etc. Signed-off-by: Joachim Wiberg --- src/conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf.c b/src/conf.c index d7cb0fec..bd03f9df 100644 --- a/src/conf.c +++ b/src/conf.c @@ -471,6 +471,7 @@ void conf_save_service(int type, char *cfg, char *file) svc_t foo; FILE *fp; + mkpath(FINIT_RUNPATH_, 0755); snprintf(fn, sizeof(fn), "%s/%s", FINIT_RUNPATH_, file); if (fexist(fn)) warn("File %s already exists, overwriting.", fn);