diff options
Diffstat (limited to 'sys-apps/module-init-tools/files/module-init-tools-0.9.10-fix-recursion.patch')
-rw-r--r-- | sys-apps/module-init-tools/files/module-init-tools-0.9.10-fix-recursion.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/sys-apps/module-init-tools/files/module-init-tools-0.9.10-fix-recursion.patch b/sys-apps/module-init-tools/files/module-init-tools-0.9.10-fix-recursion.patch new file mode 100644 index 000000000000..66f46409f8e2 --- /dev/null +++ b/sys-apps/module-init-tools/files/module-init-tools-0.9.10-fix-recursion.patch @@ -0,0 +1,67 @@ +--- module-init-tools-0.9.10/modprobe.c.orig 2003-03-10 19:34:08.000000000 +0200 ++++ module-init-tools-0.9.10/modprobe.c 2003-03-10 19:33:29.000000000 +0200 +@@ -1095,12 +1095,14 @@ + while ((opt = getopt_long(argc, argv, "vVC:o:rknqsclt:aif", options, NULL)) != -1){ + switch (opt) { + case 'v': ++ setenv("MODPROBE_VERBOSE", "1", 1); + verbose = 1; + break; + case 'V': + puts(PACKAGE " version " VERSION); + exit(0); + case 'C': ++ setenv("MODPROBE_CONFIG", optarg, 1); + config = optarg; + break; + case 'o': +@@ -1129,9 +1131,11 @@ + break; + case 'q': + /* FIXME: should do more than this. */ ++ setenv("MODPROBE_QUIET", "1", 1); + fail_if_already = 0; + break; + case 's': ++ setenv("MODPROBE_LOG", "1", 1); + log = 1; + break; + case 'i': +@@ -1152,6 +1156,25 @@ + } + } + ++ /* Check MODPROBE_VERBOSE */ ++ if ((getenv("MODPROBE_VERBOSE")) && (1 != verbose)) ++ if (0 == strcmp(getenv("MODPROBE_VERBOSE"), "1")) ++ verbose = 1; ++ ++ /* Check MODPROBE_CONFIG */ ++ if ((getenv("MODPROBE_CONFIG")) && (NULL == config)) ++ config = NOFAIL(strdup(getenv("MODPROBE_CONFIG"))); ++ ++ /* Check MODPROBE_QUIET */ ++ if ((getenv("MODPROBE_QUIET")) && (0 != fail_if_already)) ++ if (0 == strcmp(getenv("MODPROBE_QUIET"), "1")) ++ fail_if_already = 0; ++ ++ /* Check MODPROBE_LOG */ ++ if ((getenv("MODPROBE_LOG")) && (1 != log)) ++ if (0 == strcmp(getenv("MODPROBE_LOG"), "1")) ++ log = 1; ++ + /* If stderr not open, go to syslog */ + if (log || fstat(STDERR_FILENO, &statbuf) != 0) { + openlog("modprobe", LOG_CONS, LOG_DAEMON); +@@ -1190,8 +1213,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 */ |