kdump-lib.sh: detect secure boot on s390

On s390, if Secure-IPL is enabled, then "kexec -s -l" is required.
Otherwise kdump kernel can not be loaded.

Signed-off-by: Pingfan Liu <piliu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
This commit is contained in:
Pingfan Liu 2020-09-15 21:21:28 +08:00 committed by Kairui Song
parent 041ba89902
commit 21f5f95b06

View File

@ -612,6 +612,7 @@ is_secure_boot_enforced()
return 0
fi
# Detect secure boot on x86 and arm64
secure_boot_file=$(find /sys/firmware/efi/efivars -name SecureBoot-* 2>/dev/null)
setup_mode_file=$(find /sys/firmware/efi/efivars -name SetupMode-* 2>/dev/null)
@ -624,6 +625,11 @@ is_secure_boot_enforced()
fi
fi
# Detect secure boot on s390x
if [[ -e "/sys/firmware/ipl/secure" && "$(cat /sys/firmware/ipl/secure)" == "1" ]]; then
return 0
fi
return 1
}