diff options
| author | Christian Breunig <christian@breunig.cc> | 2024-09-16 17:33:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-16 17:33:10 +0200 |
| commit | 53fa5c9e93a45e2f8c78adf69652bc2f875cef53 (patch) | |
| tree | e49d7d635809da09df83898e720f9b053e2dfb11 /python/vyos/utils/system.py | |
| parent | 27e2016952f8fdd01d59f73c67ac9b8a30b756b6 (diff) | |
| parent | 07c4fe9ba4511f06bdd302cf37b3059ea86df8c6 (diff) | |
| download | veeos-1x-53fa5c9e93a45e2f8c78adf69652bc2f875cef53.tar.gz veeos-1x-53fa5c9e93a45e2f8c78adf69652bc2f875cef53.zip | |
Merge pull request #4020 from c-po/secure-boot
T861: op-mode: initial parts for UEFI secure boot CLI
Diffstat (limited to 'python/vyos/utils/system.py')
| -rw-r--r-- | python/vyos/utils/system.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/python/vyos/utils/system.py b/python/vyos/utils/system.py index fca93d118..7b12efb14 100644 --- a/python/vyos/utils/system.py +++ b/python/vyos/utils/system.py @@ -139,3 +139,11 @@ def get_load_averages(): res[15] = float(matches["fifteen"]) / core_count return res + +def get_secure_boot_state() -> bool: + from vyos.utils.process import cmd + from vyos.utils.boot import is_uefi_system + if not is_uefi_system(): + return False + tmp = cmd('mokutil --sb-state') + return bool('enabled' in tmp) |
