diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-02-08 07:03:44 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-02-08 07:03:44 +0000 |
commit | 4423e5beefd6f17dfa836211899ee70edcc64a5b (patch) | |
tree | ddc279b9fa00de53995e696b80671e82bcbb191c | |
parent | c5d9e8ff3d5c820606bd2e82c1ca20b1e5855e5f (diff) | |
download | busybox-w32-4423e5beefd6f17dfa836211899ee70edcc64a5b.tar.gz busybox-w32-4423e5beefd6f17dfa836211899ee70edcc64a5b.tar.bz2 busybox-w32-4423e5beefd6f17dfa836211899ee70edcc64a5b.zip |
/etc/modules.conf is a 2.6.x file while /etc/modules.conf and /etc/conf.modules are 2.4.x and older files
-rw-r--r-- | modutils/modprobe.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modutils/modprobe.c b/modutils/modprobe.c index 5e7486a81..57e19b4ab 100644 --- a/modutils/modprobe.c +++ b/modutils/modprobe.c | |||
@@ -496,11 +496,15 @@ static struct dep_t *build_dep(void) | |||
496 | /* | 496 | /* |
497 | * First parse system-specific options and aliases | 497 | * First parse system-specific options and aliases |
498 | * as they take precedence over the kernel ones. | 498 | * as they take precedence over the kernel ones. |
499 | * >=2.6: we only care about modprobe.conf | ||
500 | * <=2.4: we care about modules.conf and conf.modules | ||
499 | */ | 501 | */ |
500 | if (!ENABLE_FEATURE_2_6_MODULES | 502 | if (ENABLE_FEATURE_2_6_MODULES |
501 | || (fd = open("/etc/modprobe.conf", O_RDONLY)) < 0) | 503 | && (fd = open("/etc/modprobe.conf", O_RDONLY)) < 0) |
502 | if ((fd = open("/etc/modules.conf", O_RDONLY)) < 0) | 504 | if (ENABLE_FEATURE_2_4_MODULES |
503 | fd = open("/etc/conf.modules", O_RDONLY); | 505 | && (fd = open("/etc/modules.conf", O_RDONLY)) < 0) |
506 | if (ENABLE_FEATURE_2_4_MODULES) | ||
507 | fd = open("/etc/conf.modules", O_RDONLY); | ||
504 | 508 | ||
505 | if (fd >= 0) { | 509 | if (fd >= 0) { |
506 | include_conf(&first, ¤t, buffer, sizeof(buffer), fd); | 510 | include_conf(&first, ¤t, buffer, sizeof(buffer), fd); |