dracut/0402-driver-fail-summary.patch
Thomas Renninger 308f04f080 Accepting request 342283 from home:favogt:branches:Base:System
- Add 0402-driver-fail-summary.patch:
    - 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

- Add 0203-no-fail-builtin-module.patch:
    Don't let inst1mod fail if module is built-in
    - Fixes bsc#935563

OBS-URL: https://build.opensuse.org/request/show/342283
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=235
2015-11-05 14:26:14 +00:00

89 lines
2.7 KiB
Diff

From 9e0f4d437b55ff17a0c9e3cdca5e1dcdec136ca8 Mon Sep 17 00:00:00 2001
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>
---
dracut-functions.sh | 11 ++++-------
dracut.sh | 9 +++++++++
2 files changed, 13 insertions(+), 7 deletions(-)
Index: dracut-043/dracut-functions.sh
===================================================================
--- dracut-043.orig/dracut-functions.sh
+++ dracut-043/dracut-functions.sh
@@ -1676,14 +1676,16 @@ instmods() {
[[ $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
@@ -1765,7 +1767,7 @@ instmods() {
while read _mod || [ -n "$_mod" ]; do
inst1mod "${_mod%.ko*}" || {
if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then
- dfatal "Failed to install module $_mod"
+ echo $_mod >> /tmp/dracut_failed_drivers
fi
}
done
@@ -1773,7 +1775,7 @@ instmods() {
while (($# > 0)); do # filenames as arguments
inst1mod ${1%.ko*} || {
if [[ "$_check" == "yes" ]] && [[ "$_silent" == "no" ]]; then
- dfatal "Failed to install module $1"
+ echo $1 >> /tmp/dracut_failed_drivers
fi
}
shift
Index: dracut-043/dracut.sh
===================================================================
--- dracut-043.orig/dracut.sh
+++ dracut-043/dracut.sh
@@ -420,6 +420,8 @@ verbosity_mod_l=0
unset kernel
unset outfile
+> /tmp/dracut_failed_drivers
+
rearrange_params "$@"
eval set -- "$TEMP"
@@ -1789,6 +1791,13 @@ if ! (
fi
dinfo "*** Creating initrd image file '$outfile' done ***"
+if [[ -s /tmp/dracut_failed_drivers ]]; then
+ dwarn "Some kernel modules could not be included: "
+ while read line; do
+ dwarn "$line"
+ done < /tmp/dracut_failed_drivers
+fi
+
if (( maxloglvl >= 5 )); then
if [[ $allowlocal ]]; then
"$dracutbasedir/lsinitrd.sh" "$outfile"| ddebug