Unverified Commit 4cdd1358 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Continue booting when Fiano fails (#376)

Add error handling for logo replacement in BIOS
parent 1b3f506b
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -48,7 +48,10 @@ if [ ! -s "$DEST.rom" ] || [ ! -f "$DEST.rom" ]; then
  if [[ "${LOGO:-}" == [Nn]* ]]; then
    cp "$OVMF/$ROM" "$DEST.tmp"
  else
    /run/utk.bin "$OVMF/$ROM" replace_ffs LogoDXE "/var/www/img/${PROCESS,,}.ffs" save "$DEST.tmp"
    if ! /run/utk.bin "$OVMF/$ROM" replace_ffs LogoDXE "/var/www/img/${PROCESS,,}.ffs" save "$DEST.tmp"; then
      warn "failed to add custom logo to BIOS!"
      cp "$OVMF/$ROM" "$DEST.tmp"
    fi
  fi
  mv "$DEST.tmp" "$DEST.rom"
  ! setOwner "$DEST.rom" && error "Failed to set the owner for \"$DEST.rom\" !"