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 <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-10-04 18:48:13 +02:00
parent 5d703fd39e
commit b4d10cbade
+1
View File
@@ -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);