public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] pbs2to3: fix boot-mode detection
@ 2023-08-09 10:34 Stoiko Ivanov
  2023-08-11  7:34 ` [pbs-devel] applied: " Wolfgang Bumiller
  0 siblings, 1 reply; 2+ messages in thread
From: Stoiko Ivanov @ 2023-08-09 10:34 UTC (permalink / raw)
  To: pbs-devel

/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>
---
technically only needed on master - since the check is not run before
the upgrade
 src/bin/pbs2to3.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/pbs2to3.rs b/src/bin/pbs2to3.rs
index a052ae3a..9a18d7b2 100644
--- a/src/bin/pbs2to3.rs
+++ b/src/bin/pbs2to3.rs
@@ -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(());
-- 
2.39.2





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-11  7:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 10:34 [pbs-devel] [PATCH proxmox-backup] pbs2to3: fix boot-mode detection Stoiko Ivanov
2023-08-11  7:34 ` [pbs-devel] applied: " Wolfgang Bumiller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal