Return the correct exit code of rebuild initrd
Related: RHEL-29941 Upstream: Fedora Conflict: None commit f6e00948aba7c31f722af79ed72c4020868dcad7 Author: Tao Liu <ltao@redhat.com> Date: Fri Oct 18 21:45:03 2024 +1300 Return the correct exit code of rebuild initrd Resolves: https://issues.redhat.com/browse/RHEL-63047 The exit code of rebuild_initrd() should be either of rebuild_kdump/fadump_initrd(), rather than set_vmcore_creation_status(), otherwise it will cause a regression when rebuild initrd fails. Fixes: 88525ebf ("Introduce vmcore creation notification to kdump") Signed-off-by: Tao Liu <ltao@redhat.com> Signed-off-by: Tao Liu <ltao@redhat.com>
This commit is contained in:
parent
6cd5205ade
commit
cb5cd377e3
44
0001-Return-the-correct-exit-code-of-rebuild-initrd.patch
Normal file
44
0001-Return-the-correct-exit-code-of-rebuild-initrd.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From f6e00948aba7c31f722af79ed72c4020868dcad7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tao Liu <ltao@redhat.com>
|
||||||
|
Date: Fri, 18 Oct 2024 21:45:03 +1300
|
||||||
|
Subject: [PATCH] Return the correct exit code of rebuild initrd
|
||||||
|
|
||||||
|
Resolves: https://issues.redhat.com/browse/RHEL-63047
|
||||||
|
|
||||||
|
The exit code of rebuild_initrd() should be either of
|
||||||
|
rebuild_kdump/fadump_initrd(), rather than set_vmcore_creation_status(),
|
||||||
|
otherwise it will cause a regression when rebuild initrd fails.
|
||||||
|
|
||||||
|
Fixes: 88525ebf ("Introduce vmcore creation notification to kdump")
|
||||||
|
|
||||||
|
Signed-off-by: Tao Liu <ltao@redhat.com>
|
||||||
|
---
|
||||||
|
kdumpctl | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/kdumpctl b/kdumpctl
|
||||||
|
index 82b7fb1..0140eeb 100755
|
||||||
|
--- a/kdumpctl
|
||||||
|
+++ b/kdumpctl
|
||||||
|
@@ -173,6 +173,7 @@ rebuild_kdump_initrd()
|
||||||
|
|
||||||
|
rebuild_initrd()
|
||||||
|
{
|
||||||
|
+ local _ret
|
||||||
|
dinfo "Rebuilding $TARGET_INITRD"
|
||||||
|
|
||||||
|
if [[ ! -w $(dirname "$TARGET_INITRD") ]]; then
|
||||||
|
@@ -185,8 +186,10 @@ rebuild_initrd()
|
||||||
|
else
|
||||||
|
rebuild_kdump_initrd
|
||||||
|
fi
|
||||||
|
+ _ret=$?
|
||||||
|
|
||||||
|
set_vmcore_creation_status 'clear' "$VMCORE_CREATION_STATUS"
|
||||||
|
+ return $_ret
|
||||||
|
}
|
||||||
|
|
||||||
|
#$1: the files to be checked with IFS=' '
|
||||||
|
--
|
||||||
|
2.40.1
|
||||||
|
|
@ -9,6 +9,10 @@ License: GPL-2.0-only
|
|||||||
URL: https://github.com/rhkdump/kdump-utils
|
URL: https://github.com/rhkdump/kdump-utils
|
||||||
Source0: https://github.com/rhkdump/kdump-utils/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/rhkdump/kdump-utils/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# Return the correct exit code of rebuild initrd
|
||||||
|
# Author: Tao Liu <ltao@redhat.com>
|
||||||
|
Patch1: 0001-Return-the-correct-exit-code-of-rebuild-initrd.patch
|
||||||
|
|
||||||
%ifarch ppc64 ppc64le
|
%ifarch ppc64 ppc64le
|
||||||
Requires(post): servicelog
|
Requires(post): servicelog
|
||||||
Recommends: keyutils
|
Recommends: keyutils
|
||||||
|
Loading…
Reference in New Issue
Block a user