From 686193b70169bf9319ca16901c807bbfe17430c9 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sun, 10 Sep 2017 14:03:56 +0200 Subject: [PATCH] Only load modules at bootstrap Signed-off-by: Joachim Nilsson --- src/conf.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/conf.c b/src/conf.c index bf488fb1..0e5b9ea8 100644 --- a/src/conf.c +++ b/src/conf.c @@ -300,8 +300,12 @@ static void parse_dynamic(char *line, struct timeval *mtime) /* Kernel module to load at bootstrap */ if (MATCH_CMD(line, "module ", x)) { - char *mod = strip_line(x); + char *mod; + if (runlevel != 0) + return; + + mod = strip_line(x); strcpy(cmd, "modprobe "); strlcat(cmd, mod, sizeof(cmd)); run_interactive(cmd, "Loading kernel module %s", mod);