[pbs-devel] applied: [PATCH proxmox-backup] pbs2to3: fix boot-mode detection

Wolfgang Bumiller w.bumiller at proxmox.com
Fri Aug 11 09:34:38 CEST 2023


applied, thanks

On Wed, Aug 09, 2023 at 10:34:26AM +0000, Stoiko Ivanov wrote:
> /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 at proxmox.com>
> ---
> technically only needed on master - since the check is not run before
> the upgrade

picked into stable-2 anyway for the sake of keeping them in sync for
potential future patch conflicts

>  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





More information about the pbs-devel mailing list