mkdumprd: allow spaces after 'path' config phrase with network dump setting
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 by checking the /var/crash directory regardless of the path value. ssh kdump(a)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(a)ab.jp.nec.com> Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
parent
4a44eee472
commit
2310616572
2
mkdumprd
2
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 /)
|
||||
|
Loading…
Reference in New Issue
Block a user