[prev in list] [next in list] [prev in thread] [next in thread] 

List:       initramfs
Subject:    [PATCH] dracut: Don't suppress the modprobe error output.
From:       maximilian attems <max () stro ! at>
Date:       2011-02-16 13:56:07
Message-ID: 1297864567-15328-1-git-send-email-max () stro ! at
[Download RAW message or body]

It happens that either due to newer modprobe or missing depmod
module-init-tools cries.
Suppressing the error ensures for a funny debug search for the user.
Resulting initramfs is generally unbootable due to missing module deps.

Better use the quiet option of modprobe itself.
It makes it less chatty, but doesn't suppress "fatal" errors.

Signed-off-by: maximilian attems <max@stro.at>
---
[ untested, as no dracut install at hand -maks ]
 dracut-functions  |    2 +-
 dracut-gencmdline |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dracut-functions b/dracut-functions
index 9ac0bba..eef8f1e 100755
--- a/dracut-functions
+++ b/dracut-functions
@@ -670,7 +670,7 @@ install_kmod_with_fw() {
 for_each_kmod_dep() {
     local func=$1 kmod=$2 cmd modpapth options
     shift 2
-    modprobe "$@" --ignore-install --show-depends $kmod 2>/dev/null | \
+    modprobe "$@" --ignore-install --quiet --show-depends $kmod | \
         while read cmd modpath options; do
         [[ $cmd = insmod ]] || continue
         $func $modpath
diff --git a/dracut-gencmdline b/dracut-gencmdline
index 76c91ac..90e4906 100755
--- a/dracut-gencmdline
+++ b/dracut-gencmdline
@@ -72,7 +72,7 @@ moduledep() {
     fi
     vecho -n "Looking for deps of module $1"
     deps=""
-    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) +    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)  [ -n "$deps" ] && vecho ": $deps" || vecho
 }
 
-- 
1.7.2.3

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic