summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2003-03-15 06:11:23 +0000
committerMartin Schlemmer <azarah@gentoo.org>2003-03-15 06:11:23 +0000
commitbec09e3b760a0b628bc54f1d546b45b525a95041 (patch)
tree8a106a85b8a7a032f1d9ff925e15889966ead714 /sys-apps/module-init-tools/files
parentfix 17319 ... do not call modprobe with -s (diff)
downloadgentoo-2-bec09e3b760a0b628bc54f1d546b45b525a95041.tar.gz
gentoo-2-bec09e3b760a0b628bc54f1d546b45b525a95041.tar.bz2
gentoo-2-bec09e3b760a0b628bc54f1d546b45b525a95041.zip
tweak module-init-tools-0.9.10-be-quiet-for-devfsd.patch to be more effective on recursive calls
Diffstat (limited to 'sys-apps/module-init-tools/files')
-rw-r--r--sys-apps/module-init-tools/files/module-init-tools-0.9.10-be-quiet-for-devfsd.patch24
1 files changed, 20 insertions, 4 deletions
diff --git a/sys-apps/module-init-tools/files/module-init-tools-0.9.10-be-quiet-for-devfsd.patch b/sys-apps/module-init-tools/files/module-init-tools-0.9.10-be-quiet-for-devfsd.patch
index 5e1a00e9f412..36ca968d2226 100644
--- a/sys-apps/module-init-tools/files/module-init-tools-0.9.10-be-quiet-for-devfsd.patch
+++ b/sys-apps/module-init-tools/files/module-init-tools-0.9.10-be-quiet-for-devfsd.patch
@@ -1,5 +1,5 @@
--- module-init-tools-0.9.10/modprobe.c.orig 2003-03-15 06:51:14.000000000 +0200
-+++ module-init-tools-0.9.10/modprobe.c 2003-03-15 07:24:21.000000000 +0200
++++ module-init-tools-0.9.10/modprobe.c 2003-03-15 07:57:58.000000000 +0200
@@ -50,6 +50,8 @@
/* Do we use syslog or stderr for messages? */
@@ -28,21 +28,37 @@
static void grammar(const char *cmd, const char *filename, unsigned int line)
{
-@@ -1175,6 +1180,13 @@
+@@ -1161,10 +1166,6 @@
+ 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"))
+@@ -1175,6 +1176,18 @@
if (0 == strcmp(getenv("MODPROBE_LOG"), "1"))
log = 1;
+ /* If no logging, and we have 'MODPROBE_CONFIG=/etc/modprobe.devfs', then
+ * be totally quiet. Note that this catches recursive calls, so it should
-+ * not be a first call to modprobe ... */
++ * not be a first call to modprobe, and we should check it *before* we
++ * check MODPROBE_CONFIG ... */
+ if ((!log) && (!config) && (getenv("MODPROBE_CONFIG")))
+ if (0 == strcmp(getenv("MODPROBE_CONFIG"), "/etc/modprobe.devfs"))
+ quiet = 1;
+
++ /* Check MODPROBE_CONFIG */
++ if ((getenv("MODPROBE_CONFIG")) && (NULL == config))
++ config = NOFAIL(strdup(getenv("MODPROBE_CONFIG")));
++
/* If logging was requested, do not output to stdout */
if (log) {
openlog("modprobe", 0, LOG_DAEMON);
-@@ -1226,6 +1238,35 @@
+@@ -1226,6 +1239,35 @@
}
}