mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
plugins: pidfile: Fall back to /run if _PATH_VARRUN doesn't exist
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
8355c37285
commit
2857dafaf4
1 file changed
+5
-2
+5
-2
@@ -235,8 +235,11 @@ static void pidfile_init(void *arg)
|
||||
*/
|
||||
path = realpath(_PATH_VARRUN, NULL);
|
||||
if (!path) {
|
||||
_pe("Failed ");
|
||||
return;
|
||||
path = realpath("/run", NULL);
|
||||
if (!path) {
|
||||
_e("System does not have %s or /run, aborting.", _PATH_VARRUN);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (pidfile_add_path(&iw_pidfile, path))
|
||||
|
||||
Reference in new issue
Block a user