mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 13:33:09 +07:00
plugins: create /var/run/finit/cond/pid directory
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -231,8 +231,14 @@ static void pidfile_reconf(void *arg)
|
||||
|
||||
static void pidfile_init(void *arg)
|
||||
{
|
||||
char piddir[MAX_ARG_LEN];
|
||||
char *path;
|
||||
|
||||
if (mkpath(pid_runpath(_PATH_CONDPID, piddir, sizeof(piddir)), 0755) && errno != EEXIST) {
|
||||
_pe("Failed creating %s condition directory, %s", COND_PID, _PATH_CONDPID);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* The bootmisc plugin is responsible for setting up /var/run.
|
||||
* and/or /run, with proper symlinks etc. We depend on bootmisc
|
||||
|
||||
+1
-1
@@ -52,8 +52,8 @@ const char *cond_path(const char *name)
|
||||
|
||||
unsigned int cond_get_gen(const char *file)
|
||||
{
|
||||
unsigned int gen;
|
||||
char *ptr, path[256];
|
||||
unsigned int gen;
|
||||
FILE *fp;
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -6,9 +6,11 @@
|
||||
|
||||
#define COND_BASE "finit/cond"
|
||||
#define COND_USR "usr/"
|
||||
#define COND_PID "pid/"
|
||||
|
||||
#define _PATH_COND _PATH_VARRUN COND_BASE "/"
|
||||
#define _PATH_CONDUSR _PATH_COND COND_USR
|
||||
#define _PATH_CONDPID _PATH_COND COND_PID
|
||||
#define _PATH_RECONF _PATH_COND "reconf"
|
||||
|
||||
typedef enum cond_state {
|
||||
|
||||
Reference in New Issue
Block a user