Mate Kukri 3f9eace2d3 util/grub-install: Delay copying files to {grubdir,platdir} after install_device was validated
Previously grub-install copied modules to grubdir before doing any
validation on the install_device.

When grub-install was called with an invalid install_device, modules
were already copied to /boot before it found out and was forced to rely
on atexit() rollback.

This patch delays copying the modules after at least some install_device
validation was done, and thus reduces reliance on successful rollback.

Signed-off-by: Mate Kukri <mate.kukri@canonical.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2023-12-05 15:32:30 +01:00
..
2010-09-15 14:46:53 +02:00
2022-03-14 16:01:07 +01:00
2022-03-14 16:01:07 +01:00
2023-05-17 13:23:44 +02:00
2023-05-17 13:23:44 +02:00
2023-06-01 11:45:00 +02:00
2013-11-07 06:35:50 +01:00
2023-05-17 13:23:44 +02:00
2022-03-14 16:01:07 +01:00