Allow kernel modules to be loaded from /etc/finit.d/*.conf

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-09-10 13:48:07 +02:00
parent e52d952ca5
commit d54d5b7f20
+11 -10
View File
@@ -232,16 +232,6 @@ static void parse_static(char *line)
return;
}
if (MATCH_CMD(line, "module ", x)) {
char *mod = strip_line(x);
strcpy(cmd, "modprobe ");
strlcat(cmd, mod, sizeof(cmd));
run_interactive(cmd, "Loading kernel module %s", mod);
return;
}
if (MATCH_CMD(line, "mknod ", x)) {
char *dev = strip_line(x);
@@ -307,6 +297,17 @@ static void parse_dynamic(char *line, struct timeval *mtime)
if (MATCH_CMD(line, "#", x))
return;
/* Kernel module to load at bootstrap */
if (MATCH_CMD(line, "module ", x)) {
char *mod = strip_line(x);
strcpy(cmd, "modprobe ");
strlcat(cmd, mod, sizeof(cmd));
run_interactive(cmd, "Loading kernel module %s", mod);
return;
}
/* Monitored daemon, will be respawned on exit */
if (MATCH_CMD(line, "service ", x)) {
service_register(SVC_TYPE_SERVICE, x, mtime, NULL);