SHA256
Fix for wrong rexexp and dir deletion error.
This commit is contained in:
1 parent
43c04f6d41
commit
1621a11e3f
3 files changed
+4
-4
No files matched your search
+2
-2
@@ -498,7 +498,7 @@ pub fn check_if_run_as_root() -> bool {
|
||||
///
|
||||
fn get_efi_part_info() -> Result<(String, String), ExecCommandError> {
|
||||
use regex_lite::Regex;
|
||||
let re = Regex::new(r#"^PARTN="([0-9]+)" PKNAME="([0-9a-Z]+)"$"#).unwrap();
|
||||
let re = Regex::new(r#"^PARTN="([0-9]+)" PKNAME="([a-zA-Z0-9]+)"$"#).unwrap();
|
||||
|
||||
let lsblk_query = format!("PARTLABEL==\"{}\"", EFI_PARTLABEL);
|
||||
let lsblk_args: Vec<&str> = vec!["-P", "-p", "-Q", &lsblk_query, "-o", "PARTN,PKNAME"];
|
||||
@@ -648,7 +648,7 @@ pub fn init_efi_boot_partition_content() -> Result<(), ExecCommandError> {
|
||||
let kernel_img_path = format!("/usr/lib/modules/{}/vmlinuz", kernel_dir);
|
||||
let efi_dir = format!("{}/EFI", EFI_BOOT_MOUNT_POINT);
|
||||
println!("Romoving efi dir {}", efi_dir);
|
||||
fs::remove_dir_all(&efi_dir)?;
|
||||
let _ = fs::remove_dir_all(&efi_dir);
|
||||
|
||||
println!("Creating efi dir {}", EFI_BOOT_DIR);
|
||||
fs::create_dir_all(EFI_BOOT_DIR)?;
|
||||
|
||||
Reference in new issue
Block a user