From: Harald Hoyer Date: Fri, 20 May 2011 18:12:54 +0000 (+0200) Subject: dracut-functions: do not redirect modprobe error output to /dev/null X-Git-Tag: 011~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c30c65c1b2fd97ed840a166d8ecb7322929652c7;p=thirdparty%2Fdracut.git 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. --- 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 $? }