Skip to content

Commit

Permalink
Merge pull request containers#569 from cgwalters/no-firmware-no-efivars
Browse files Browse the repository at this point in the history
efi: Only try to update firmware if booted via EFI
  • Loading branch information
cgwalters authored Nov 19, 2023
2 parents 3dad8d4 + 9bae8e6 commit ad66260
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/efi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ impl Efi {

#[context("Updating EFI firmware variables")]
fn update_firmware(&self, device: &str, espdir: &openat::Dir) -> Result<()> {
if !is_efi_booted()? {
log::debug!("Not booted via EFI, skipping firmware update");
return Ok(());
}
let efidir = &espdir.sub_dir("EFI").context("Opening EFI")?;
let vendordir = super::grubconfigs::find_efi_vendordir(efidir)?;
let vendordir = vendordir
Expand Down

0 comments on commit ad66260

Please sign in to comment.