summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2003-03-09 12:11:44 +0000
committerMartin Schlemmer <azarah@gentoo.org>2003-03-09 12:11:44 +0000
commitc997e8de1ffafa99215e22a6aa37f80600f32759 (patch)
treec80e32eb0e12c006e8514cdbb00da68557a28a99 /sys-apps/module-init-tools
parentmark x86 (diff)
downloadhistorical-c997e8de1ffafa99215e22a6aa37f80600f32759.tar.gz
historical-c997e8de1ffafa99215e22a6aa37f80600f32759.tar.bz2
historical-c997e8de1ffafa99215e22a6aa37f80600f32759.zip
fix modprobe using wrong config file
Diffstat (limited to 'sys-apps/module-init-tools')
-rw-r--r--sys-apps/module-init-tools/files/module-init-tools-0.9.10-fix-more-recursive-bugs.patch18
1 files changed, 15 insertions, 3 deletions
diff --git a/sys-apps/module-init-tools/files/module-init-tools-0.9.10-fix-more-recursive-bugs.patch b/sys-apps/module-init-tools/files/module-init-tools-0.9.10-fix-more-recursive-bugs.patch
index 448e1ccad032..5ba40ab019ea 100644
--- a/sys-apps/module-init-tools/files/module-init-tools-0.9.10-fix-more-recursive-bugs.patch
+++ b/sys-apps/module-init-tools/files/module-init-tools-0.9.10-fix-more-recursive-bugs.patch
@@ -1,5 +1,5 @@
---- module-init-tools-0.9.10/modprobe.c.orig 2003-03-09 13:02:52.000000000 +0200
-+++ module-init-tools-0.9.10/modprobe.c 2003-03-09 13:17:05.000000000 +0200
+--- module-init-tools-0.9.10/modprobe.c.orig 2003-03-09 13:47:46.000000000 +0200
++++ module-init-tools-0.9.10/modprobe.c 2003-03-09 13:49:09.000000000 +0200
@@ -1096,12 +1096,14 @@
while ((opt = getopt_long(argc, argv, "vVC:o:rknqsclt:aif", options, NULL)) != -1){
switch (opt) {
@@ -26,7 +26,7 @@
+
+ /* Check MODPROBE_CONFIG */
+ if ((getenv("MODPROBE_CONFIG")) && (NULL == config))
-+ config = getenv("MODPROBE_CONFIG");
++ config = NOFAIL(strdup(getenv("MODPROBE_CONFIG")));
+
/* Check MODPROBE_QUIET */
- if (getenv("MODPROBE_QUIET"))
@@ -43,3 +43,15 @@
if (0 == strcmp(getenv("MODPROBE_LOG"), "1"))
log = 1;
+@@ -1206,8 +1218,10 @@
+ if (config && !dump_only && strncmp(argv[optind], "/dev/", 5) == 0) {
+ if (strcmp("/etc/modules.conf", config) == 0)
+ config = NULL;
+- else if (strcmp("/etc/modules.devfs", config) == 0)
++ else if (strcmp("/etc/modules.devfs", config) == 0) {
+ config = "/etc/modprobe.devfs";
++ setenv("MODPROBE_CONFIG", "/etc/modprobe.devfs", 1);
++ }
+ }
+
+ /* -r only allows certain restricted options */