kdump-lib.sh: Fix is_user_configured_dump_target()

Currently, is_user_configured_dump_target() doesn't work as expected
due to lack of grep -E option.

As a result, kdump service with a ssh dump configuration can unnecessarily
fail to start due to the non-existence of a directory at where the path
option specifies on the local system:

  kdumpctl[9760]: Rebuilding /boot/initramfs-5.4.19-200.fc31.x86_64kdump.img
  kdumpctl[9760]: Dump path /var/crash/ssh does not exist.
  kdumpctl[9760]: mkdumprd: failed to make kdump initrd
  kdumpctl[9760]: Starting kdump: [FAILED]

Signed-off-by: Kazuhito Hagio <k-hagio-ab@nec.com>
Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
HAGIO KAZUHITO(萩尾 一仁) 2020-02-24 17:11:02 +00:00 committed by Kairui Song
parent a1c28126ef
commit 64d30f54b9
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ to_dev_name() {
is_user_configured_dump_target()
{
grep -q "^ext[234]|^xfs|^btrfs|^minix|^raw|^nfs|^ssh" /etc/kdump.conf || is_mount_in_dracut_args;
grep -E -q "^ext[234]|^xfs|^btrfs|^minix|^raw|^nfs|^ssh" /etc/kdump.conf || is_mount_in_dracut_args;
}
get_user_configured_dump_disk()