Hi Kazuhito,
Kazuhito Hagio k-hagio@ab.jp.nec.com 于2022年5月26日周四 12:42写道:
Without this patch, when there are two or more spaces after 'path' configuration phrase with ssh or nfs setting, SAVE_PATH is set to '/var/crash' in mkdumprd, and in most cases kdump service fails to start.
ssh kdump@192.168.122.1 path /kdump ^^
This behavior would be too sensitive and different from the other configurations. With this patch, mkdumprd allows such spaces.
Signed-off-by: Kazuhito Hagio k-hagio@ab.jp.nec.com
mkdumprd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkdumprd b/mkdumprd index a6f7fe8..aa0abfd 100644 --- a/mkdumprd +++ b/mkdumprd @@ -13,7 +13,7 @@ export IN_KDUMP=1
conf_file="/etc/kdump.conf" SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa" -SAVE_PATH=$(grep ^path $conf_file| cut -d' ' -f2) +SAVE_PATH=$(awk '/^path/ {print $2}' $conf_file) [ -z "$SAVE_PATH" ] && SAVE_PATH=$DEFAULT_PATH # strip the duplicated "/" SAVE_PATH=$(echo $SAVE_PATH | tr -s /) -- 2.18.0
commit fd7e7be ('mkdumprd: Use get_save_path instead of parsing config') have already converted all path parsing code in mkdumprd to use get_save_path, which covers all the corner cases, I think you might be using an outdated code base? Or maybe this patch is not for Fedora kexec-tools?