kdump-lib: strip grub device from kdump_bootdir

When trying to setup kdump for fedora-coreos, kdumpctl start fails to
find the correct boot directory since BOOT_IMAGE start with the grub
device name

Signed-off-by: Yuval Turgeman <yturgema@redhat.com>
This commit is contained in:
Yuval Turgeman 2019-09-24 12:19:43 +03:00
parent e07fc3e071
commit 4714c7c8a3

View File

@ -667,7 +667,7 @@ check_boot_dir()
kdump_bootdir="/boot"
else
eval $(cat /proc/cmdline| grep "BOOT_IMAGE" | cut -d' ' -f1)
kdump_bootdir="/boot"$(dirname $BOOT_IMAGE)
kdump_bootdir="/boot"$(dirname ${BOOT_IMAGE#*)})
fi
echo $kdump_bootdir
}