From: Thomas Renninger Date: Thu, 11 Dec 2014 14:46:20 +0000 (+0100) Subject: dracut: Do not stop installing drivers if one fails X-Git-Tag: 041~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d40852e8cf5a4b5db38cbbb52c42b348d3c7502;p=thirdparty%2Fdracut.git dracut: Do not stop installing drivers if one fails --add-drivers and --filesystems kernel drivers are added via: instmods -c The check option makes the function return if one driver could not get installed without trying to install further drivers which is bad. The user is still informed ($_silent is by default no), but all modules passed to instmods are tried to be loaded, even if one fails. Signed-off-by: Thomas Renninger --- diff --git a/dracut-functions.sh b/dracut-functions.sh index 7a12a7643..b91d8dc8f 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -1742,18 +1742,16 @@ instmods() { if (($# == 0)); then # filenames from stdin while read _mod; do inst1mod "${_mod%.ko*}" || { - if [[ "$_check" == "yes" ]]; then - [[ "$_silent" == "no" ]] && dfatal "Failed to install module $_mod" - return 1 + if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then + dfatal "Failed to install module $_mod" fi } done fi while (($# > 0)); do # filenames as arguments inst1mod ${1%.ko*} || { - if [[ "$_check" == "yes" ]]; then - [[ "$_silent" == "no" ]] && dfatal "Failed to install module $1" - return 1 + if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then + dfatal "Failed to install module $1" fi } shift