#2562 PR merged: Add 2 more 32MiB blocks to efi_img_sz (issue 2552)

Labels: enhancement, fixed / solved / done, minor bug

jsmeix opened issue at 2021-01-29 12:30:

  • Type: Bug Fix / Enhancement

  • Impact: Normal

  • Reference to related issue (URL):
    https://github.com/rear/rear/issues/2552

  • How was this pull request tested?
    Not at all tested by me (I don't use EFI).

  • Brief description of the changes in this pull request:

Add 2 more 32MiB blocks to be on the safe side against inexplicaple failures like
"cp: error writing '/tmp/rear.XXX/tmp/efi_virt/./EFI/BOOT/elilo.conf': No space left on device"
where the above calculated $efi_img_sz is a bit too small in practice.

jsmeix commented at 2021-01-29 14:48:

Always nice to see how one could make code even simpler:
https://github.com/rear/rear/pull/2562/commits/d6790296bdd8b3bbc4f15c1680d50b7d19b57155

RFC 1925 item 12 (excerpt):

perfection has been reached
not when there is nothing left to add,
but when there is nothing left to take away

https://tools.ietf.org/html/rfc1925

I wish you all a relaxed and recovering weekend!

jsmeix commented at 2021-01-29 14:54:

I would like to wait until next week so that @abbbi has a chance to test it,
cf. https://github.com/rear/rear/issues/2552#issuecomment-769778075

jsmeix commented at 2021-01-29 14:58:

Interestingly (( var += 2 )) does not result an error if $var is no number

# foo=123 ; (( foo += 2 )) && echo "'$foo'" || echo fail
echo '125'

# foo=bar ; (( foo += 2 )) && echo "'$foo'" || echo fail
echo '2'

at least for me with GNU bash version 4.4.23 (on openSUSE Leap 15.2).

jsmeix commented at 2021-02-01 14:56:

@abbbi
thank you for testing it!


[Export of Github issue for rear/rear.]