`sbsign` does not issue any error if there is not enough disk space to create
the signed file using its `--output` option. So, verify the signed image after
its creation using `sbverify`.
Fixes issue #2197
${uefi_secureboot_engine:+--engine "$uefi_secureboot_engine"} \
--key "${uefi_secureboot_key}" \
--cert "${uefi_secureboot_cert}" \
- --output "$outfile" "${uefi_outdir}/linux.efi"; then
+ --output "$outfile" "${uefi_outdir}/linux.efi" \
+ && sbverify --cert "${uefi_secureboot_cert}" "$outfile" > /dev/null 2>&1; then
dinfo "*** Creating signed UEFI image file '$outfile' done ***"
else
+ rm -f -- "$outfile"
dfatal "*** Creating signed UEFI image file '$outfile' failed ***"
exit 1
fi