summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-05-31 20:06:24 +0000
committerjhb <jhb@FreeBSD.org>2002-05-31 20:06:24 +0000
commit43d66222dd584cbdfa479816200284385112943c (patch)
tree329cc4a055c7078a9d867fd0dfb8a58813043e0e /usr.sbin/sysinstall
parent65861c4bc2104149e42a16440298a633946281dc (diff)
downloadFreeBSD-src-43d66222dd584cbdfa479816200284385112943c.zip
FreeBSD-src-43d66222dd584cbdfa479816200284385112943c.tar.gz
Don't load a module from /stand/modules in the MFS root if it is already in
the kernel.
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