Skip to content

Commit 6b8ae68

Browse files
Merge pull request #363 from open-edge-platform/fix-elxr-build
Update imageos.go to bypass access EFI variable
2 parents 82f3d6f + e507b73 commit 6b8ae68

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

internal/image/imageos/imageos.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,8 +568,9 @@ func (imageOs *ImageOs) installImagePkgs(installRoot string, template *config.Im
568568

569569
output, err := shell.ExecCmdWithStream(installCmd, true, installRoot, envVars)
570570
if err != nil {
571-
if strings.Contains(output, "Failed to write 'LoaderSystemToken' EFI variable") {
572-
log.Debugf("Expected error: The EFI variable shouldn't be accessed in chroot.")
571+
if strings.Contains(output, "Failed to write 'LoaderSystemToken' EFI variable") ||
572+
strings.Contains(output, "Failed to create EFI Boot variable entry") {
573+
log.Debugf("Expected error: EFI variables cannot be accessed in chroot environment.")
573574
} else {
574575
log.Errorf("Failed to install package %s: %v", pkg, err)
575576
return fmt.Errorf("failed to install package %s: %w", pkg, err)

0 commit comments

Comments
 (0)