diff --git a/doc/plugins.md b/doc/plugins.md index 9b42419e..546e5e96 100644 --- a/doc/plugins.md +++ b/doc/plugins.md @@ -40,7 +40,10 @@ For your convenience a set of *optional* plugins are available: * *rtc.so*: Restore and save system clock from/to RTC on boot/halt. Enabled by default. -* *modules-load.so*: Scans /etc/modules-load.d for modules to modprobe. +* *modules-load.so*: Scans `/etc/modules-load.d/` for modules to load + using `modprobe`. Each file in this directory can contain multiple + lines with the name of the module to load. Any line starting with + the standard UNIX comment character, `#`, is skipped. * *netlink.so*: Listens to Linux kernel Netlink events for gateway and interfaces. These events are then sent to the Finit service monitor diff --git a/plugins/modules-load.c b/plugins/modules-load.c index 7781ca6f..33251a7c 100644 --- a/plugins/modules-load.c +++ b/plugins/modules-load.c @@ -69,6 +69,9 @@ static void load(void *arg) while (fgets(line, sizeof(line), fp)) { char cmd[CMD_SIZE], *mod, *args; + if (line[0] == '#') + continue; + mod = strip_line(line); if (!*mod) continue;