mirror of
https://github.com/troglobit/finit.git
synced 2026-11-12 16:51:25 +00: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:
1 parent
2dd5d40833
commit
df54f5a59c
1 file changed
+4
@@ -142,6 +142,10 @@ static void coldplug(void *arg)
|
|||||||
struct module *m, *tmp;
|
struct module *m, *tmp;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
|
/* Skip for systems without modules, e.g. small embedded or containers */
|
||||||
|
if (!fisdir("/lib/modules"))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!fismnt("/sys")) {
|
if (!fismnt("/sys")) {
|
||||||
print(1, "Cannot modprobe system, /sys is not mounted");
|
print(1, "Cannot modprobe system, /sys is not mounted");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in new issue
Block a user