mirror of
https://github.com/troglobit/finit.git
synced 2026-11-29 21:08:21 +00:00
Allow kernel modules to be loaded from /etc/finit.d/*.conf
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
e52d952ca5
commit
d54d5b7f20
1 file changed
+11
-10
+11
-10
@@ -232,16 +232,6 @@ static void parse_static(char *line)
|
|||||||
return;
|
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)) {
|
if (MATCH_CMD(line, "mknod ", x)) {
|
||||||
char *dev = strip_line(x);
|
char *dev = strip_line(x);
|
||||||
|
|
||||||
@@ -307,6 +297,17 @@ static void parse_dynamic(char *line, struct timeval *mtime)
|
|||||||
if (MATCH_CMD(line, "#", x))
|
if (MATCH_CMD(line, "#", x))
|
||||||
return;
|
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 */
|
/* Monitored daemon, will be respawned on exit */
|
||||||
if (MATCH_CMD(line, "service ", x)) {
|
if (MATCH_CMD(line, "service ", x)) {
|
||||||
service_register(SVC_TYPE_SERVICE, x, mtime, NULL);
|
service_register(SVC_TYPE_SERVICE, x, mtime, NULL);
|
||||||
|
|||||||
Reference in new issue
Block a user