dracut: Do not stop installing drivers if one fails
PATCH 1/1 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.
dracut-functions.sh +4 -6
@@ -1689,18 +1689,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
Quoted 39 lines · Thomas Renninger
--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 <[email protected]>Index:
dracut-037/dracut-functions.sh
===================================================================dracut-functions.sh +4
-7@@ -1689,18 +1689,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 --
Quoted 4 lines
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Well that's the purpose of "-c". Maybe we should better fix the call with "-c" and/or react to the return code.