toolkit/func/core/pkg_kernel/11-test-secure-boot.sh

13 lines
372 B
Bash
Raw Normal View History

2021-07-05 06:50:25 +00:00
#!/bin/bash
r_log "kernel" "Install pesign"
p_installPackageNormal pesign
ARCH=$(uname -m)
if [ "$ARCH" == "x86_64" ]; then
for k in $(rpm -q kernel --qf "%{version}-%{release}.%{arch}\n"); do
r_log "kernel" "Validating kernel $k"
pesign --show-signature --in "/boot/vmlinuz-${k}" | grep -Eq 'Rocky Linux Secure Boot Signing'
r_checkExitStatus $?
done
fi