summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/modules.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr.sbin/sysinstall/modules.c b/usr.sbin/sysinstall/modules.c
index f18beb5..18acc4d 100644
--- a/usr.sbin/sysinstall/modules.c
+++ b/usr.sbin/sysinstall/modules.c
@@ -62,6 +62,10 @@ moduleInitialize(void)
while ((dp = readdir(dirp))) {
if (dp->d_namlen < (sizeof(".ko") - 1)) continue;
if (strcmp(dp->d_name + dp->d_namlen - (sizeof(".ko") - 1), ".ko") == 0) {
+ strcpy(module, dp->d_name);
+ module[dp->d_namlen - (sizeof(".ko") - 1)] = '\0';
+ if (modfind(module) != -1)
+ continue;
strcpy(module, MODULESDIR);
strcat(module, "/");
strcat(module, dp->d_name);
OpenPOWER on IntegriCloud