From: Thomas Renninger Subject: [PATCH 29/42] dracut: Do not stop installing drivers if one fails Date: Thu, 11 Dec 2014 15:46:20 +0100 Message-ID: <1418309193-11208-30-git-send-email-trenn@suse.de> References: <1418309193-11208-1-git-send-email-trenn@suse.de> Return-path: In-Reply-To: <1418309193-11208-1-git-send-email-trenn-l3A5Bk7waGM@public.gmane.org> Sender: initramfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, trenn-l3A5Bk7waGM@public.gmane.org --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 --- dracut-functions.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dracut-functions.sh b/dracut-functions.sh index 7a12a76..b91d8dc 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 -- 1.8.5.2