mirror of
https://github.com/troglobit/finit.git
synced 2026-10-24 11:54:36 +00: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:
1 parent
5d703fd39e
commit
b4d10cbade
1 file changed
+1
@@ -471,6 +471,7 @@ void conf_save_service(int type, char *cfg, char *file)
|
|||||||
svc_t foo;
|
svc_t foo;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
||||||
|
mkpath(FINIT_RUNPATH_, 0755);
|
||||||
snprintf(fn, sizeof(fn), "%s/%s", FINIT_RUNPATH_, file);
|
snprintf(fn, sizeof(fn), "%s/%s", FINIT_RUNPATH_, file);
|
||||||
if (fexist(fn))
|
if (fexist(fn))
|
||||||
warn("File %s already exists, overwriting.", fn);
|
warn("File %s already exists, overwriting.", fn);
|
||||||
|
|||||||
Reference in new issue
Block a user