diff --git a/src/install/security.rs b/src/install/security.rs index 33d525d..e063e78 100644 --- a/src/install/security.rs +++ b/src/install/security.rs @@ -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::>(); 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"]); diff --git a/src/main.rs b/src/main.rs index 986bd0e..f456913 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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);