Unverified Commit 7686deab authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Use default logo when custom is not found (#1055)

* feat: Use default logo when custom is not found

* Update boot.sh
parent e46e0e7d
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -73,10 +73,15 @@ case "${BOOT_MODE,,}" in

    if [ ! -s "$DEST.rom" ]; then
      [ ! -s "$OVMF/$ROM" ] && error "UEFI boot file ($OVMF/$ROM) not found!" && exit 44

      logo="/var/www/img/${PROCESS,,}.ffs"
      [ ! -s "$logo" ] && logo="/var/www/img/qemu.ffs"
      [ ! -s "$logo" ] && LOGO="N"
    
      if [[ "${LOGO:-}" == [Nn]* ]]; then
        cp "$OVMF/$ROM" "$DEST.tmp"
      else
        if ! /run/utk.bin "$OVMF/$ROM" replace_ffs LogoDXE "/var/www/img/${PROCESS,,}.ffs" save "$DEST.tmp"; then
        if ! /run/utk.bin "$OVMF/$ROM" replace_ffs LogoDXE "$logo" save "$DEST.tmp"; then
          warn "failed to add custom logo to BIOS!"
          cp "$OVMF/$ROM" "$DEST.tmp"
        fi