mirror of
https://github.com/troglobit/finit.git
synced 2026-10-02 05:52:48 +07:00
plugins: update mdevd to use new notification framework
Last update of plugin before dropping it in favor of an equivalent .conf snippet. (Pending new finit-conf repository). Issue #327 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+3
-1
@@ -46,7 +46,9 @@ static void setup(void *arg)
|
||||
if (plugin_find("mdevd")) {
|
||||
path = which("mdevd-coldplug");
|
||||
if (path) {
|
||||
run_interactive(path, "Populating device tree");
|
||||
snprintf(cmd, sizeof(cmd), "cgroup.system [S] <service/mdevd/ready> log %s "
|
||||
" -- Populating device tree", path);
|
||||
service_register(SVC_TYPE_RUN, cmd, global_rlimit, NULL);
|
||||
free(path);
|
||||
}
|
||||
return;
|
||||
|
||||
+3
-3
@@ -38,7 +38,7 @@
|
||||
|
||||
#define MDEVD_DAEMON "mdevd"
|
||||
/* Rebroadcast events onto nlgroup 4 */
|
||||
#define MDEVD_ARGS "-C -O 4"
|
||||
#define MDEVD_ARGS "-C -O 4 -D %n"
|
||||
#define MDEVD_DESC "MDEVD Extended Hotplug Daemon"
|
||||
|
||||
#ifndef MDEVD_DAEMONUSER
|
||||
@@ -85,10 +85,10 @@ static void setup(void *arg)
|
||||
|
||||
/* Register service with Finit */
|
||||
if (debug)
|
||||
snprintf(line, sizeof(line), "[S12345789] cgroup.system pid:!%s @%s:%s %s -v3 %s -- %s",
|
||||
snprintf(line, sizeof(line), "[S12345789] cgroup.system notify:s6 pid:!%s @%s:%s %s -v3 %s -- %s",
|
||||
MDEVD_DAEMONPIDFILE, MDEVD_DAEMONUSER, MDEVD_DAEMONGROUP, cmd, MDEVD_ARGS, MDEVD_DESC);
|
||||
else
|
||||
snprintf(line, sizeof(line), "[S12345789] cgroup.system pid:!%s @%s:%s %s %s -- %s",
|
||||
snprintf(line, sizeof(line), "[S12345789] cgroup.system notify:s6 pid:!%s @%s:%s %s %s -- %s",
|
||||
MDEVD_DAEMONPIDFILE, MDEVD_DAEMONUSER, MDEVD_DAEMONGROUP, cmd, MDEVD_ARGS, MDEVD_DESC);
|
||||
if (service_register(SVC_TYPE_SERVICE, line, global_rlimit, NULL))
|
||||
err(1, "Failed registering %s", MDEVD_DAEMON);
|
||||
|
||||
Reference in New Issue
Block a user