Hi Coiby,
this one doesn't seem to be merged yet.
On Thu, 29 Sep 2022 12:51:15 +0800
Coiby Xu <coxu(a)redhat.com> wrote:
Currently, updating kexec-tools gives the warning
sed: can't read /etc/default/grub: No such file or directory
This happens because s390x doesn't use GRUB and /etc/default/grub
doesn't exist. We need to skip both reading and writing to
/etc/default/grub.
Reported-by: Jie Li <jieli(a)redhat.com>
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
kdumpctl | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kdumpctl b/kdumpctl
index c7efa2c3..498bb964 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -1428,10 +1428,6 @@ _update_kernel_arg_in_grub_etc_default()
{
local _para=$1 _val=$2 _para_val
- if [[ $(uname -m) == s390x ]]; then
- return
- fi
-
I think you need to keep this one. Otherwise I'm afraid you break
"kdumpctl reset-crashkernel --kernel=ALL" again, i.e. revert the fix
done in e8ae897 ("skip updating /etc/default/grub for s390x").
Thanks
Philipp
if [[ -n $_val ]]; then
_para_val="$_para=$_val"
fi
@@ -1606,6 +1602,10 @@ update_crashkernel_in_grub_etc_default_after_update()
local _crashkernel _fadump_val
local _dump_mode _old_default_crashkernel _new_default_crashkernel
+ if [[ $(uname -m) == s390x ]]; then
+ return
+ fi
+
_crashkernel=$(_read_kernel_arg_in_grub_etc_default crashkernel)
if [[ -z $_crashkernel ]]; then