|
Harald Hoyer |
b94732 |
From 8d40852e8cf5a4b5db38cbbb52c42b348d3c7502 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
b94732 |
From: Thomas Renninger <trenn@suse.de>
|
|
Harald Hoyer |
b94732 |
Date: Thu, 11 Dec 2014 15:46:20 +0100
|
|
Harald Hoyer |
b94732 |
Subject: [PATCH] dracut: Do not stop installing drivers if one fails
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
--add-drivers and --filesystems kernel drivers are added via:
|
|
Harald Hoyer |
b94732 |
instmods -c
|
|
Harald Hoyer |
b94732 |
The check option makes the function return if one driver could not get
|
|
Harald Hoyer |
b94732 |
installed without trying to install further drivers which is bad.
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
The user is still informed ($_silent is by default no), but all modules
|
|
Harald Hoyer |
b94732 |
passed to instmods are tried to be loaded, even if one fails.
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
Signed-off-by: Thomas Renninger <trenn@suse.de>
|
|
Harald Hoyer |
b94732 |
---
|
|
Harald Hoyer |
b94732 |
dracut-functions.sh | 10 ++++------
|
|
Harald Hoyer |
b94732 |
1 file changed, 4 insertions(+), 6 deletions(-)
|
|
Harald Hoyer |
b94732 |
|
|
Harald Hoyer |
b94732 |
diff --git a/dracut-functions.sh b/dracut-functions.sh
|
|
Harald Hoyer |
b94732 |
index 7a12a76..b91d8dc 100755
|
|
Harald Hoyer |
b94732 |
--- a/dracut-functions.sh
|
|
Harald Hoyer |
b94732 |
+++ b/dracut-functions.sh
|
|
Harald Hoyer |
b94732 |
@@ -1742,18 +1742,16 @@ instmods() {
|
|
Harald Hoyer |
b94732 |
if (($# == 0)); then # filenames from stdin
|
|
Harald Hoyer |
b94732 |
while read _mod; do
|
|
Harald Hoyer |
b94732 |
inst1mod "${_mod%.ko*}" || {
|
|
Harald Hoyer |
b94732 |
- if [[ "$_check" == "yes" ]]; then
|
|
Harald Hoyer |
b94732 |
- [[ "$_silent" == "no" ]] && dfatal "Failed to install module $_mod"
|
|
Harald Hoyer |
b94732 |
- return 1
|
|
Harald Hoyer |
b94732 |
+ if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then
|
|
Harald Hoyer |
b94732 |
+ dfatal "Failed to install module $_mod"
|
|
Harald Hoyer |
b94732 |
fi
|
|
Harald Hoyer |
b94732 |
}
|
|
Harald Hoyer |
b94732 |
done
|
|
Harald Hoyer |
b94732 |
fi
|
|
Harald Hoyer |
b94732 |
while (($# > 0)); do # filenames as arguments
|
|
Harald Hoyer |
b94732 |
inst1mod ${1%.ko*} || {
|
|
Harald Hoyer |
b94732 |
- if [[ "$_check" == "yes" ]]; then
|
|
Harald Hoyer |
b94732 |
- [[ "$_silent" == "no" ]] && dfatal "Failed to install module $1"
|
|
Harald Hoyer |
b94732 |
- return 1
|
|
Harald Hoyer |
b94732 |
+ if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then
|
|
Harald Hoyer |
b94732 |
+ dfatal "Failed to install module $1"
|
|
Harald Hoyer |
b94732 |
fi
|
|
Harald Hoyer |
b94732 |
}
|
|
Harald Hoyer |
b94732 |
shift
|