]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
dracut: Don't suppress the modprobe error output.
authormaximilian attems <max@stro.at>
Wed, 16 Feb 2011 13:56:07 +0000 (14:56 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 16 Feb 2011 14:01:30 +0000 (15:01 +0100)
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>
dracut-functions
dracut-gencmdline

index 9ac0bba3e7e1a768715efe7dc4aad3f24d8d45ba..eef8f1ed2f24739e8cec5535f5f5d9ac72566baa 100755 (executable)
@@ -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
index 76c91acd28b06a3fa956a306324fd09fb98422a5..90e49065b4b43eb74ecefdd6980435b54e238904 100755 (executable)
@@ -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
 }