From c30c65c1b2fd97ed840a166d8ecb7322929652c7 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Fri, 20 May 2011 20:12:54 +0200 Subject: [PATCH] dracut-functions: do not redirect modprobe error output to /dev/null filter modprobe error messages and log them. Very useful if modules.dep is missing. --- dracut-functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dracut-functions b/dracut-functions index ac7fd763c..4d5a78a90 100755 --- a/dracut-functions +++ b/dracut-functions @@ -728,7 +728,7 @@ install_kmod_with_fw() { for_each_kmod_dep() { local _func=$1 _kmod=$2 _cmd _modpath _options _found=0 shift 2 - modprobe "$@" --ignore-install --show-depends $_kmod 2>/dev/null | ( + modprobe "$@" --ignore-install --show-depends $_kmod 2>"$initdir/modprobe.err" | ( while read _cmd _modpath _options; do [[ $_cmd = insmod ]] || continue $_func ${_modpath} || exit $? @@ -737,6 +737,8 @@ for_each_kmod_dep() { [[ $_found -eq 0 ]] && exit 1 exit 0 ) + egrep -v 'FATAL: Module .* not found.' "$initdir/modprobe.err" | derror + rm -f "$initdir/modprobe.err" return $? } -- 2.47.3