Skip to content

Commit

Permalink
plugins: ensure /var/run/finit/cond exists
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
  • Loading branch information
troglobit committed Jan 7, 2023
1 parent bfd1f36 commit 8bbae3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions plugins/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ static void sys_init(void *arg)
char sysdir[MAX_ARG_LEN];
char *path;

mkpath(_PATH_COND, 0755);
if (mkpath(pid_runpath(_PATH_CONDSYS, sysdir, sizeof(sysdir)), 0755) && errno != EEXIST) {
err(1, "Failed creating %s condition directory, %s", COND_SYS, _PATH_CONDSYS);
return;
Expand Down
1 change: 1 addition & 0 deletions plugins/usr.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ static void usr_init(void *arg)
char usrdir[MAX_ARG_LEN];
char *path;

mkpath(_PATH_COND, 0755);
if (mkpath(pid_runpath(_PATH_CONDUSR, usrdir, sizeof(usrdir)), 0755) && errno != EEXIST) {
err(1, "Failed creating %s condition directory, %s", COND_USR, _PATH_CONDUSR);
return;
Expand Down

0 comments on commit 8bbae3d

Please sign in to comment.