Blame 0004-dracut-Don-t-suppress-the-modprobe-error-output.patch

Harald Hoyer 0260fa
From f63c30d89bf4831723cd54b8e39be8c20f278591 Mon Sep 17 00:00:00 2001
Harald Hoyer 0260fa
From: maximilian attems <max@stro.at>
Harald Hoyer 0260fa
Date: Wed, 16 Feb 2011 14:56:07 +0100
Harald Hoyer 0260fa
Subject: [PATCH] dracut: Don't suppress the modprobe error output.
Harald Hoyer 0260fa
Harald Hoyer 0260fa
It happens that either due to newer modprobe or missing depmod
Harald Hoyer 0260fa
module-init-tools cries.
Harald Hoyer 0260fa
Suppressing the error ensures for a funny debug search for the user.
Harald Hoyer 0260fa
Resulting initramfs is generally unbootable due to missing module deps.
Harald Hoyer 0260fa
Harald Hoyer 0260fa
Better use the quiet option of modprobe itself.
Harald Hoyer 0260fa
It makes it less chatty, but doesn't suppress "fatal" errors.
Harald Hoyer 0260fa
Harald Hoyer 0260fa
Signed-off-by: maximilian attems <max@stro.at>
Harald Hoyer 0260fa
---
Harald Hoyer 0260fa
 dracut-functions  |    2 +-
Harald Hoyer 0260fa
 dracut-gencmdline |    2 +-
Harald Hoyer 0260fa
 2 files changed, 2 insertions(+), 2 deletions(-)
Harald Hoyer 0260fa
Harald Hoyer 0260fa
diff --git a/dracut-functions b/dracut-functions
Harald Hoyer 0260fa
index 9ac0bba..eef8f1e 100755
Harald Hoyer 0260fa
--- a/dracut-functions
Harald Hoyer 0260fa
+++ b/dracut-functions
Harald Hoyer 0260fa
@@ -670,7 +670,7 @@ install_kmod_with_fw() {
Harald Hoyer 0260fa
 for_each_kmod_dep() {
Harald Hoyer 0260fa
     local func=$1 kmod=$2 cmd modpapth options
Harald Hoyer 0260fa
     shift 2
Harald Hoyer 0260fa
-    modprobe "$@" --ignore-install --show-depends $kmod 2>/dev/null | \
Harald Hoyer 0260fa
+    modprobe "$@" --ignore-install --quiet --show-depends $kmod | \
Harald Hoyer 0260fa
         while read cmd modpath options; do
Harald Hoyer 0260fa
         [[ $cmd = insmod ]] || continue
Harald Hoyer 0260fa
         $func $modpath
Harald Hoyer 0260fa
diff --git a/dracut-gencmdline b/dracut-gencmdline
Harald Hoyer 0260fa
index 76c91ac..90e4906 100755
Harald Hoyer 0260fa
--- a/dracut-gencmdline
Harald Hoyer 0260fa
+++ b/dracut-gencmdline
Harald Hoyer 0260fa
@@ -72,7 +72,7 @@ moduledep() {
Harald Hoyer 0260fa
     fi
Harald Hoyer 0260fa
     vecho -n "Looking for deps of module $1"
Harald Hoyer 0260fa
     deps=""
Harald Hoyer 0260fa
-    deps=$(modprobe $MPARGS --set-version $kernel --show-depends $1 2>/dev/null| awk '/^insmod / { print gensub(".*/","","g",$2) }' | while read foo ; do [ "${foo%%.ko}" != "$1" ] && echo -n "${foo%%.ko} " ; done)
Harald Hoyer 0260fa
+    deps=$(modprobe $MPARGS --set-version $kernel --quiet --show-depends $1 | awk '/^insmod / { print gensub(".*/","","g",$2) }' | while read foo ; do [ "${foo%%.ko}" != "$1" ] && echo -n "${foo%%.ko} " ; done)
Harald Hoyer 0260fa
     [ -n "$deps" ] && vecho ": $deps" || vecho
Harald Hoyer 0260fa
 }
Harald Hoyer 0260fa