[PATCH v2 00/14] kdumpctl: various fixes and cleanups
by Philipp Rudo
Hi,
while looking into transforming mkdumprd and mkfadumprd into library functions
I noticed various nits in kdumpctl. This series addresses them.
The series is made up of two parts:
Patches 1-8 are small independent cleanups and fixes.
Patches 9-15 tries to reduce the number of file accesses to /etc/kdump.conf. It
achieves this by only parsing kdump.conf once in check_config and storing the
parsed values in an array. Later accesses can then simply use the value stored
in the array instead of calling kdump_get_conf_val.
Thanks
Philipp
v2:
* Drop patch 2 as caused problems when value were edited in
/etc/sysconfig/kdump
* Fix false '!' in patch 13
Philipp Rudo (14):
kdump-capture.service: switch to journal for stdout
kdump-lib: fix typo in variable name
kdumpctl: remove unnecessary uses of $?
kdump-lib-initramfs: merge definitions for default ssh key
kdumpctl: fix comment in check_and_wait_network_ready
kdumpctl: forbid aliases from ssh config
kdumpctl: simplify propagate_ssh_key
kdumpctl: merge check_ssh_config into check_config
kdumpctl: reduce file operations on kdump.conf
kdumpctl: drop SAVE_PATH variable
kdumpctl: drop SSH_KEY_LOCATION variable
kdumpctl: drop DUMP_TARGET variable
kdumpctl: remove kdump_get_conf_val in save_raw
kdumpctl: simplify local_fs_dump_target
dracut-kdump-capture.service | 4 +-
dracut-kdump.sh | 2 +-
kdump-lib-initramfs.sh | 1 +
kdump-lib.sh | 14 +--
kdumpctl | 227 +++++++++++++++--------------------
mkdumprd | 2 +-
6 files changed, 112 insertions(+), 138 deletions(-)
--
2.35.1
2 years
[PATCH] kdumpctl/estimate: Fix unnecessary warning
by Philipp Rudo
do_estimate prints the warning that the reserved crashkernel is lower
than the recommended one even then when both values are identical. This
might cause confusion. So omit printing the warning when both values are
equal.
Signed-off-by: Philipp Rudo <prudo(a)redhat.com>
---
kdumpctl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kdumpctl b/kdumpctl
index 1869753..b7922a6 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -1270,7 +1270,7 @@ do_estimate()
done
fi
- if [[ $reserved_size -le $recommended_size ]]; then
+ if [[ $reserved_size -lt $recommended_size ]]; then
echo "WARNING: Current crashkernel size is lower than recommended size $((recommended_size / size_mb))M."
fi
}
--
2.35.1
2 years