kdumpctl: Use kexec file based mode to unload kdump kernel

Currently old kexec syscall denies unloading a kernel if secureboot is enabled.
I think this is not right behavior and should be changed. But for now, use
new syscall if secureboot is enabled and that allows unloading kernel.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
Vivek Goyal 2014-09-08 11:35:21 -04:00 committed by Baoquan He
parent 7041917dbd
commit d301d5e542

View File

@ -826,7 +826,12 @@ stop_fadump()
stop_kdump()
{
$KEXEC -p -u
if is_secure_boot_enforced; then
$KEXEC -s -p -u
else
$KEXEC -p -u
fi
if [ $? != 0 ]; then
echo "kexec: failed to unload kdump kernel"
return 1