fix
This commit is contained in:
parent
f73a6cfd5c
commit
5884c6ca8f
2 changed files with 9 additions and 3 deletions
|
@ -49,8 +49,7 @@ pub fn setup_tpm_unlock(conf: &DriveConfig) {
|
|||
|
||||
// SECURE BOOT
|
||||
|
||||
/// Setup Secure Boot on the system
|
||||
pub fn setup_secure_boot() {
|
||||
pub fn ensure_secure_boot() {
|
||||
let (stdout, _) = run_command(&["sbctl", "status"], None, false);
|
||||
let binding = stdout.lines().collect::<Vec<&str>>();
|
||||
let status = binding.get(1).unwrap();
|
||||
|
@ -62,6 +61,11 @@ pub fn setup_secure_boot() {
|
|||
);
|
||||
std::process::exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/// Setup Secure Boot on the system
|
||||
pub fn setup_secure_boot() {
|
||||
ensure_secure_boot();
|
||||
|
||||
install_pkgs(&["sbctl", "sbsigntools"]);
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ mod linux;
|
|||
mod pkg;
|
||||
mod print;
|
||||
use create_iso::create_iso;
|
||||
use install::install;
|
||||
use install::{install, security::ensure_secure_boot};
|
||||
use linux::is_root;
|
||||
use print::print_config;
|
||||
use yansi::{Color, Paint};
|
||||
|
@ -61,6 +61,8 @@ fn main() {
|
|||
std::process::exit(1);
|
||||
}
|
||||
|
||||
ensure_secure_boot();
|
||||
|
||||
let config_file: &String = install_args.get_one("config").unwrap();
|
||||
let force = install_args.get_flag("force");
|
||||
let conf = read_conf(config_file);
|
||||
|
|
Loading…
Add table
Reference in a new issue