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@redhat.com
Signed-off-by: Coiby Xu coxu@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
Hi Coiby,
this one doesn't seem to be merged yet.
On Thu, 29 Sep 2022 12:51:15 +0800 Coiby Xu coxu@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@redhat.com
Signed-off-by: Coiby Xu coxu@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
returnfi
_crashkernel=$(_read_kernel_arg_in_grub_etc_default crashkernel)
if [[ -z $_crashkernel ]]; then
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@redhat.com
Signed-off-by: Coiby Xu coxu@redhat.com --- kdumpctl | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 7f82f4fa..9961053e 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1616,6 +1616,10 @@ update_crashkernel_in_grub_etc_default_after_update() return fi
+ if [[ $(uname -m) == s390x ]]; then + return + fi + _crashkernel=$(_read_kernel_arg_in_grub_etc_default crashkernel)
if [[ -z $_crashkernel ]]; then
Hi Coiby,
On Wed, 26 Oct 2022 14:20:43 +0800 Coiby Xu coxu@redhat.com wrote:
Currently, updating kexec-tools gives the warning
^ maybe add a "on s390x" here
other than that Reviewed-by: Philipp Rudo prudo@redhat.com
In my opinion you don't need to sent a v3 for that. Just update the commit message and push it. Unless someone else has a complaint of course.
Thanks Philipp
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@redhat.com
Signed-off-by: Coiby Xu coxu@redhat.com
kdumpctl | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 7f82f4fa..9961053e 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1616,6 +1616,10 @@ update_crashkernel_in_grub_etc_default_after_update() return fi
if [[ $(uname -m) == s390x ]]; then
returnfi
_crashkernel=$(_read_kernel_arg_in_grub_etc_default crashkernel)
if [[ -z $_crashkernel ]]; then
On Wed, Oct 26, 2022 at 01:52:42PM +0200, Philipp Rudo wrote:
Hi Coiby,
On Wed, 26 Oct 2022 14:20:43 +0800 Coiby Xu coxu@redhat.com wrote:
Currently, updating kexec-tools gives the warning
^ maybe add a "on s390x" here
Applied, thanks for the suggestion and code review!
other than that Reviewed-by: Philipp Rudo prudo@redhat.com
In my opinion you don't need to sent a v3 for that. Just update the commit message and push it. Unless someone else has a complaint of course.
Thanks Philipp
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@redhat.com
Signed-off-by: Coiby Xu coxu@redhat.com
kdumpctl | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 7f82f4fa..9961053e 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1616,6 +1616,10 @@ update_crashkernel_in_grub_etc_default_after_update() return fi
if [[ $(uname -m) == s390x ]]; then
returnfi
_crashkernel=$(_read_kernel_arg_in_grub_etc_default crashkernel)
if [[ -z $_crashkernel ]]; then
On Tue, Oct 25, 2022 at 04:26:01PM +0200, Philipp Rudo wrote:
Hi Coiby,
this one doesn't seem to be merged yet.
On Thu, 29 Sep 2022 12:51:15 +0800 Coiby Xu coxu@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@redhat.com
Signed-off-by: Coiby Xu coxu@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 for catching this issue! v2 has been sent.
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
returnfi
_crashkernel=$(_read_kernel_arg_in_grub_etc_default crashkernel)
if [[ -z $_crashkernel ]]; then