diff --git a/toolbox/modprobe.cpp b/toolbox/modprobe.cpp index 7fde4915e..13026ac30 100644 --- a/toolbox/modprobe.cpp +++ b/toolbox/modprobe.cpp @@ -245,8 +245,10 @@ extern "C" int modprobe_main(int argc, char** argv) { } free(kernel_dirs); - // Allow modules to be directly inside /lib/modules - mod_dirs.emplace_back(LIB_MODULES_PREFIX); + if (mod_dirs.empty() || getpagesize() == 4096) { + // Allow modules to be directly inside /lib/modules + mod_dirs.emplace_back(LIB_MODULES_PREFIX); + } } LOG(DEBUG) << "mode is " << mode;