lib/YaST/EFItools.pm

tools for EFI related operations on /sys/firmware/efi/

check_secure_boot_status

The function reads out the octal values of the variable in efivars/SecureBoot-*. Secure Boot status is stored in the 5th byte of that variable (0=disabled, 1=enabled) See https://www.codelinsoft.it/sito/index.php/support/wiki/secure-boot for details

We check if the 5th byte is set to 0 or 1 and act accordingly.