mirror of
https://github.com/troglobit/finit.git
synced 2026-10-30 12:50:34 +00:00
modules-load: add task name config
Signed-off-by: Robert Andersson <robert.m.andersson@se.atlascopco.com>
This commit is contained in:
1 parent
f2cab53e55
commit
423c8d41a7
1 file changed
+4
-2
@@ -33,7 +33,8 @@
|
|||||||
#include "conf.h"
|
#include "conf.h"
|
||||||
|
|
||||||
#define MODULES_LOAD_PATH "/etc/modules-load.d"
|
#define MODULES_LOAD_PATH "/etc/modules-load.d"
|
||||||
#define SERVICE_LINE ":%d [2345] /sbin/modprobe %s %s -- Kernel module: %s"
|
#define SERVICE_LINE \
|
||||||
|
":%d name:modprobe.%s [2345] /sbin/modprobe %s %s -- Kernel module: %s"
|
||||||
|
|
||||||
static void load(void *arg)
|
static void load(void *arg)
|
||||||
{
|
{
|
||||||
@@ -68,7 +69,8 @@ static void load(void *arg)
|
|||||||
|
|
||||||
mod = strtok_r(mod, " ", &args);
|
mod = strtok_r(mod, " ", &args);
|
||||||
|
|
||||||
snprintf(cmd, sizeof(cmd), SERVICE_LINE, index, mod, args, mod);
|
snprintf(cmd, sizeof(cmd), SERVICE_LINE,
|
||||||
|
index, mod, mod, args, mod);
|
||||||
service_register(SVC_TYPE_TASK, cmd, global_rlimit, NULL);
|
service_register(SVC_TYPE_TASK, cmd, global_rlimit, NULL);
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
|
|||||||
Reference in new issue
Block a user