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
|
// SECURE BOOT
|
||||||
|
|
||||||
/// Setup Secure Boot on the system
|
pub fn ensure_secure_boot() {
|
||||||
pub fn setup_secure_boot() {
|
|
||||||
let (stdout, _) = run_command(&["sbctl", "status"], None, false);
|
let (stdout, _) = run_command(&["sbctl", "status"], None, false);
|
||||||
let binding = stdout.lines().collect::<Vec<&str>>();
|
let binding = stdout.lines().collect::<Vec<&str>>();
|
||||||
let status = binding.get(1).unwrap();
|
let status = binding.get(1).unwrap();
|
||||||
|
@ -62,6 +61,11 @@ pub fn setup_secure_boot() {
|
||||||
);
|
);
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Setup Secure Boot on the system
|
||||||
|
pub fn setup_secure_boot() {
|
||||||
|
ensure_secure_boot();
|
||||||
|
|
||||||
install_pkgs(&["sbctl", "sbsigntools"]);
|
install_pkgs(&["sbctl", "sbsigntools"]);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ mod linux;
|
||||||
mod pkg;
|
mod pkg;
|
||||||
mod print;
|
mod print;
|
||||||
use create_iso::create_iso;
|
use create_iso::create_iso;
|
||||||
use install::install;
|
use install::{install, security::ensure_secure_boot};
|
||||||
use linux::is_root;
|
use linux::is_root;
|
||||||
use print::print_config;
|
use print::print_config;
|
||||||
use yansi::{Color, Paint};
|
use yansi::{Color, Paint};
|
||||||
|
@ -61,6 +61,8 @@ fn main() {
|
||||||
std::process::exit(1);
|
std::process::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ensure_secure_boot();
|
||||||
|
|
||||||
let config_file: &String = install_args.get_one("config").unwrap();
|
let config_file: &String = install_args.get_one("config").unwrap();
|
||||||
let force = install_args.get_flag("force");
|
let force = install_args.get_flag("force");
|
||||||
let conf = read_conf(config_file);
|
let conf = read_conf(config_file);
|
||||||
|
|
Loading…
Add table
Reference in a new issue