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
-
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
--
2.37.3
Show replies by date