Fix Secure Boot sections

This commit is contained in:
2Shirt 2021-11-10 22:59:25 -07:00
parent 7006a6453d
commit 8ecac36a64
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 9 additions and 4 deletions

View file

@ -599,8 +599,9 @@ def is_secure_boot_enabled(raise_exceptions=False, show_alert=False):
msg_warning = 'DISABLED\n\nOS installed LEGACY'
else:
# Command completed
enabled = 'True' in proc.stdout
if 'False' in proc.stdout:
if 'True' in proc.stdout:
enabled = True
elif 'False' in proc.stdout:
msg_error = 'DISABLED'
else:
msg_warning = 'UNKNOWN'

View file

@ -517,8 +517,7 @@ def auto_show_os_name():
def auto_show_secure_boot_status():
"""Display Secure Boot status."""
TRY_PRINT.run(
'Secure Boot...', is_secure_boot_enabled,
raise_exceptions=True, show_alert=True,
'Secure Boot...', check_secure_boot_status, msg_good='Enabled',
)
@ -828,6 +827,11 @@ def uninstall_firefox():
# Misc Functions
def check_secure_boot_status():
"""Check Secure Boot status."""
is_secure_boot_enabled(raise_exceptions=True, show_alert=True)
def get_firefox_default_profile(profiles_ini):
"""Get Firefox default profile, returns(pathlib.Path, encoding) or None."""
default_profile = None