forked from pool/kdump
dd914e044d
- kdump-additional-mounts-in-dracut-module.patch: Handle additional mounts in the kdump dracut module (bsc#1089917). - kdump-run-mkinitrd-if-fadump-is-active.patch: Run mkinitrd if fadump is active (bsc#1089917). OBS-URL: https://build.opensuse.org/request/show/599435 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=163
59 lines
1.7 KiB
Diff
59 lines
1.7 KiB
Diff
From: Petr Tesarik <ptesarik@suse.com>
|
|
Date: Fri, 20 Apr 2018 17:54:19 +0200
|
|
Subject: Run mkinitrd if fadump is active
|
|
References: bsc#1089917
|
|
Upstream: merged
|
|
Git-commit: a25562cb0ff7d2b6d6df2dded8bd29c2e4d7e9ea
|
|
|
|
With fadump, the default initrd is used. It is better to call the
|
|
normal mkinitrd script to achieve consistent behaviour between
|
|
updates triggered by kdump and other changes that may require a
|
|
rebuild of the initrd.
|
|
|
|
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
|
---
|
|
init/mkdumprd | 25 ++++++++++++++++++++++++-
|
|
1 file changed, 24 insertions(+), 1 deletion(-)
|
|
|
|
--- a/init/mkdumprd
|
|
+++ b/init/mkdumprd
|
|
@@ -117,6 +117,25 @@ function run_mkinitrd()
|
|
} # }}}
|
|
|
|
#
|
|
+# Create a new fadump initrd using mkinitrd {{{
|
|
+function run_mkinitrd_fadump()
|
|
+{
|
|
+ # With fadump, we have no control over which kernel will be booted
|
|
+ # to save the dump, so do not add any versions here.
|
|
+ MKINITRD_ARGS=""
|
|
+
|
|
+ #
|
|
+ # if -q is specified, don't print mkinitrd output
|
|
+ if (( $QUIET )) ; then
|
|
+ MKINITRD_ARGS="$MKINITRD_ARGS &>/dev/null"
|
|
+ fi
|
|
+
|
|
+ status_message "Calling mkinitrd $MKINITRD_ARGS"
|
|
+ echo "Regenerating initrd ..." >&2
|
|
+ eval "bash -$- /sbin/mkinitrd $MKINITRD_ARGS"
|
|
+} # }}}
|
|
+
|
|
+#
|
|
# Create a new initrd using dracut {{{
|
|
function run_dracut()
|
|
{
|
|
@@ -219,7 +238,11 @@ if (( ! $FORCE )) ; then
|
|
fi
|
|
|
|
if [ -e $DRACUT ] ; then
|
|
- run_dracut
|
|
+ if [ "$KDUMP_FADUMP" = "yes" ] ; then
|
|
+ run_mkinitrd_fadump
|
|
+ else
|
|
+ run_dracut
|
|
+ fi
|
|
ret=$?
|
|
else
|
|
run_mkinitrd
|