bootctl: tweak "bootctl update" to be a NOP when boot loader is already current and --graceful is given
Previously, the "bootctl update" logic would refrain from downrgading a boot loader, but if the boot loader that is installed already matched the version we could install we'd install it anyway, under the assumption this was effectively without effect. This behaviour was handy while developing boot loaders, since installing a modified boot loader didn't require a version bump. However, outside of the systems of boot loader developers I don't think this behaviour makes much sense: we should always emphasize doing minimal changes to the ESP, hence when an update is supposedly not necessary, then don't do it. Only update if it really makes sense, to minimize writes to the ESP. Updating the boot loader is a good thing after all, but doing so redundantly is not. Also, downgrade the message about this to LOG_NOTICE, given this shouldn't be a reason to log. Finally, exit cleanly in this cases (or if another boot loader is detected)
This commit is contained in:
+3
-2
@@ -233,8 +233,9 @@
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--graceful</option></term>
|
||||
<listitem><para>Ignore failure when the EFI System Partition cannot be found, or when EFI variables
|
||||
cannot be written. Currently only applies to random seed operations.</para></listitem>
|
||||
<listitem><para>Ignore failure when the EFI System Partition cannot be found, when EFI variables
|
||||
cannot be written, or a different or newer boot loader is already installed. Currently only applies
|
||||
to random seed and update operations.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
|
||||
Reference in New Issue
Block a user