On Thu, 19 Sep 2024, Florent Rougon wrote:
Hi,
Le 19/09/2024, Andy Smith <a...@strugglers.net> a ?crit:
I don't think the answer, on Debian, has changed since I asked the
same question in 2020:
https://lists.debian.org/debian-user/2020/11/msg00455.html
There is a script at [1] to install as, e.g.,
/etc/grub.d/90_copy_to_boot_efi2, so that it is automatically run every
time grub updates its configuration file. I believe the script is fine,
except I would do
mount /boot/efi2
rather than
mount /boot/efi2 || :
Maybe the intent is for the script not to return a non-zero exit status
when /boot/efi2 can't be mounted, however in this case I certainly don't
want the rsync command to be run.
Haven't looked at the script but assuming it's run set -e, then your
suggestion will fail if it's already mounted.
Best would be to check that, and unmount again only if the script
mounted.
Tim.