mirror of
https://github.com/troglobit/finit.git
synced 2026-09-30 13:02:37 +07:00
plugins: modules-load: skip lines starting with '#'
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
+4
-1
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user