mirror of
https://github.com/troglobit/finit.git
synced 2026-10-26 12:14:37 +00:00
plugins: create /var/run/finit/cond/pid directory
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
7f272768e4
commit
0ac0e5c7d3
3 files changed
+9
-1
No files matched your search
@@ -231,8 +231,14 @@ static void pidfile_reconf(void *arg)
|
|||||||
|
|
||||||
static void pidfile_init(void *arg)
|
static void pidfile_init(void *arg)
|
||||||
{
|
{
|
||||||
|
char piddir[MAX_ARG_LEN];
|
||||||
char *path;
|
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.
|
* The bootmisc plugin is responsible for setting up /var/run.
|
||||||
* and/or /run, with proper symlinks etc. We depend on bootmisc
|
* 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 cond_get_gen(const char *file)
|
||||||
{
|
{
|
||||||
unsigned int gen;
|
|
||||||
char *ptr, path[256];
|
char *ptr, path[256];
|
||||||
|
unsigned int gen;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,11 @@
|
|||||||
|
|
||||||
#define COND_BASE "finit/cond"
|
#define COND_BASE "finit/cond"
|
||||||
#define COND_USR "usr/"
|
#define COND_USR "usr/"
|
||||||
|
#define COND_PID "pid/"
|
||||||
|
|
||||||
#define _PATH_COND _PATH_VARRUN COND_BASE "/"
|
#define _PATH_COND _PATH_VARRUN COND_BASE "/"
|
||||||
#define _PATH_CONDUSR _PATH_COND COND_USR
|
#define _PATH_CONDUSR _PATH_COND COND_USR
|
||||||
|
#define _PATH_CONDPID _PATH_COND COND_PID
|
||||||
#define _PATH_RECONF _PATH_COND "reconf"
|
#define _PATH_RECONF _PATH_COND "reconf"
|
||||||
|
|
||||||
typedef enum cond_state {
|
typedef enum cond_state {
|
||||||
|
|||||||
Reference in new issue
Block a user