pbs2to3: fix boot-mode detection

/sys/firmware/efi is a directory and std::path::Path seems to detect
only regular files with is_file [0].

Reported in our Enterprise support portal.

Quickly tested the fix on a VM.

https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.is_file

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
Stoiko Ivanov 2023-08-09 10:34:26 +00:00 committed by Wolfgang Bumiller
parent a24d24cf9e
commit 03a9f822b3

View File

@ -203,7 +203,7 @@ impl Checker {
return Ok(());
}
if !Path::new("/sys/firmware/efi").is_file() {
if !Path::new("/sys/firmware/efi").is_dir() {
self.output
.log_skip("System booted in legacy-mode - no need for systemd-boot")?;
return Ok(());