2016-09-01 11:57:40 +00:00
|
|
|
From 2e176c1a99db334756c91c6c0e10e029993e56c7 Mon Sep 17 00:00:00 2001
|
2015-11-05 14:26:14 +00:00
|
|
|
From: Fabian Vogt <fvogt@suse.com>
|
|
|
|
Date: Tue, 3 Nov 2015 17:25:44 +0100
|
|
|
|
Subject: [PATCH] Accumulate kernel module installation failures
|
|
|
|
|
|
|
|
- Port 0169-Enabled-Warning-for-failed-kernel-modules-per-defaul.patch:
|
|
|
|
Subject: Enable warning for failed kernel moduiles
|
|
|
|
|
|
|
|
Enabled Warning for failed kernel modules per default
|
|
|
|
and added summary of those to the end of dracut output
|
|
|
|
|
|
|
|
References: bnc#886839
|
|
|
|
|
|
|
|
- Disable inline warnings in favour of summary
|
|
|
|
|
|
|
|
Signed-off-by: Fabian Vogt <fvogt@suse.com>
|
|
|
|
---
|
2016-09-01 11:57:40 +00:00
|
|
|
dracut-init.sh | 8 +++++---
|
|
|
|
dracut.sh | 15 +++++++++++++++
|
|
|
|
2 files changed, 20 insertions(+), 3 deletions(-)
|
2015-11-05 14:26:14 +00:00
|
|
|
|
2016-09-01 11:57:40 +00:00
|
|
|
diff --git a/dracut-init.sh b/dracut-init.sh
|
|
|
|
index 9689c0b..0fda778 100644
|
|
|
|
--- a/dracut-init.sh
|
|
|
|
+++ b/dracut-init.sh
|
2016-04-12 14:08:19 +00:00
|
|
|
@@ -1084,14 +1084,16 @@ instmods() {
|
2015-11-05 14:26:14 +00:00
|
|
|
[[ $no_kernel = yes ]] && return
|
|
|
|
# called [sub]functions inherit _fderr
|
|
|
|
local _fderr=9
|
|
|
|
- local _check=no
|
|
|
|
+ local _check=yes
|
|
|
|
local _silent=no
|
|
|
|
+
|
|
|
|
if [[ $1 = '-c' ]]; then
|
|
|
|
_check=yes
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ $1 = '-s' ]]; then
|
|
|
|
+ _check=no
|
|
|
|
_silent=yes
|
|
|
|
shift
|
|
|
|
fi
|
2016-04-12 14:08:19 +00:00
|
|
|
@@ -1173,7 +1175,7 @@ instmods() {
|
2015-11-05 14:26:14 +00:00
|
|
|
while read _mod || [ -n "$_mod" ]; do
|
|
|
|
inst1mod "${_mod%.ko*}" || {
|
|
|
|
if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then
|
|
|
|
- dfatal "Failed to install module $_mod"
|
2015-11-10 12:17:01 +00:00
|
|
|
+ echo $_mod >> $tmp_dracut_failed_drivers
|
2015-11-05 14:26:14 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
done
|
2016-04-12 14:08:19 +00:00
|
|
|
@@ -1181,7 +1183,7 @@ instmods() {
|
2015-11-05 14:26:14 +00:00
|
|
|
while (($# > 0)); do # filenames as arguments
|
|
|
|
inst1mod ${1%.ko*} || {
|
|
|
|
if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then
|
|
|
|
- dfatal "Failed to install module $1"
|
2015-11-10 12:17:01 +00:00
|
|
|
+ echo $1 >> $tmp_dracut_failed_drivers
|
2015-11-05 14:26:14 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
shift
|
2016-09-01 11:57:40 +00:00
|
|
|
diff --git a/dracut.sh b/dracut.sh
|
|
|
|
index 12b253d..d7dc9ff 100755
|
|
|
|
--- a/dracut.sh
|
|
|
|
+++ b/dracut.sh
|
2015-11-26 11:35:04 +00:00
|
|
|
@@ -390,6 +390,12 @@ verbosity_mod_l=0
|
2015-11-05 14:26:14 +00:00
|
|
|
unset kernel
|
|
|
|
unset outfile
|
|
|
|
|
2015-11-10 12:17:01 +00:00
|
|
|
+if ! tmp_dracut_failed_drivers=$(mktemp /tmp/dracut.XXXXXXXXXX); then
|
|
|
|
+ echo "Could not create temporary file"
|
|
|
|
+ exit 1
|
|
|
|
+fi
|
|
|
|
+export tmp_dracut_failed_drivers
|
2015-11-05 14:26:14 +00:00
|
|
|
+
|
|
|
|
rearrange_params "$@"
|
|
|
|
eval set -- "$TEMP"
|
|
|
|
|
2016-01-27 16:45:27 +00:00
|
|
|
@@ -1761,6 +1767,15 @@ if ! (
|
2015-11-26 11:35:04 +00:00
|
|
|
exit 1
|
2015-11-05 14:26:14 +00:00
|
|
|
fi
|
|
|
|
|
2015-11-10 12:17:01 +00:00
|
|
|
+if [[ -s $tmp_dracut_failed_drivers ]]; then
|
|
|
|
+ dwarn "Some kernel modules could not be included"
|
|
|
|
+ dwarn "This is not necessarily an error:"
|
2015-11-05 14:26:14 +00:00
|
|
|
+ while read line; do
|
|
|
|
+ dwarn "$line"
|
2015-11-10 12:17:01 +00:00
|
|
|
+ done < $tmp_dracut_failed_drivers
|
2015-11-05 14:26:14 +00:00
|
|
|
+fi
|
2015-11-10 12:17:01 +00:00
|
|
|
+rm $tmp_dracut_failed_drivers
|
2015-11-05 14:26:14 +00:00
|
|
|
+
|
|
|
|
if (( maxloglvl >= 5 )); then
|
|
|
|
if [[ $allowlocal ]]; then
|
2015-11-26 11:35:04 +00:00
|
|
|
"$dracutbasedir/lsinitrd.sh" "${DRACUT_TMPDIR}/initramfs.img"| ddebug
|
2016-09-01 11:57:40 +00:00
|
|
|
--
|
|
|
|
2.6.6
|
|
|
|
|