From: Antonio Alvarez Feijoo Date: Mon, 13 Feb 2023 10:11:09 +0000 (+0100) Subject: fix(dracut.sh): handle out of space error for UEFI builds X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8602df705879100be17e93fe56f5cbeb6216248f;p=thirdparty%2Fdracut.git fix(dracut.sh): handle out of space error for UEFI builds If `cp` fails, do not continue, print an error and exit, like it's already being done for non-UEFI builds. --- diff --git a/dracut.sh b/dracut.sh index 3fbd087df..06d3d3379 100755 --- a/dracut.sh +++ b/dracut.sh @@ -2505,6 +2505,10 @@ if [[ $uefi == yes ]]; then else if cp --reflink=auto "${uefi_outdir}/linux.efi" "$outfile"; then dinfo "*** Creating UEFI image file '$outfile' done ***" + else + rm -f -- "$outfile" + dfatal "Creation of $outfile failed" + exit 1 fi fi else