mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
plugins: modprobe: Skip for systems without modules
Skip for systems without modules, e.g. small embedded or containers Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -142,6 +142,10 @@ static void coldplug(void *arg)
|
||||
struct module *m, *tmp;
|
||||
int rc = 0;
|
||||
|
||||
/* Skip for systems without modules, e.g. small embedded or containers */
|
||||
if (!fisdir("/lib/modules"))
|
||||
return;
|
||||
|
||||
if (!fismnt("/sys")) {
|
||||
print(1, "Cannot modprobe system, /sys is not mounted");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user