modules-load: add task name config

Signed-off-by: Robert Andersson <robert.m.andersson@se.atlascopco.com>
This commit is contained in:
Robert Andersson committed 2018-10-22 12:51:58 +02:00
1 parent f2cab53e55
commit 423c8d41a7
1 file changed
+4 -2
+4 -2
View File
@@ -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++;