mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user