mirror of
https://github.com/troglobit/finit.git
synced 2026-10-27 12:20:54 +00:00
Refactor sys condition plugin into a standalone keventd
This patch is a refactor of the prototype sys condition plugin. It moves most of the logic to monitor kernel events into a keventd that, currently only, sets and clears the sys/pwr/ac condition. The sys plugin itself is now only a monitor of conditions and ensures Finit follows them. This is a lot more secure and moves (at least one piece of) netlink processing out from PID 1. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
c047e37a79
commit
c251304146
5 files changed
+364
-114
No files matched your search
@@ -594,6 +594,12 @@ int main(int argc, char *argv[])
|
||||
wdog = svc_find_by_nameid("watchdog", "finit");
|
||||
}
|
||||
|
||||
/*
|
||||
* Start kernel event daemon as soon as possible, if enabled
|
||||
*/
|
||||
if (whichp(FINIT_LIBPATH_ "/keventd"))
|
||||
service_register(SVC_TYPE_SERVICE, "[123456789] cgroup.init " FINIT_LIBPATH_ "/keventd -- Finit kernel event daemon", global_rlimit, NULL);
|
||||
|
||||
/* Base FS up, enable standard SysV init signals */
|
||||
sig_setup(&loop);
|
||||
|
||||
|
||||
Reference in new issue
Block a user