This commit is contained in:
parent
d6935899f9
commit
c680a11d9e
1 changed files with 4 additions and 4 deletions
|
@ -52,11 +52,11 @@ pub fn setup_tpm_unlock(conf: &DriveConfig) {
|
||||||
pub fn has_secure_boot() -> bool {
|
pub fn has_secure_boot() -> bool {
|
||||||
let (stdout, _) = run_command_noerr(&["sbctl", "status"], None, false);
|
let (stdout, _) = run_command_noerr(&["sbctl", "status"], None, false);
|
||||||
let binding = stdout.lines().collect::<Vec<&str>>();
|
let binding = stdout.lines().collect::<Vec<&str>>();
|
||||||
let status = binding.get(1).unwrap();
|
if let Some(status) = binding.get(1) {
|
||||||
|
|
||||||
if status.contains("Setup Mode") || status.contains("Enabled") {
|
if status.contains("Setup Mode") || status.contains("Enabled") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue