]> git.ipfire.org Git - thirdparty/systemd.git/commit
bootctl: tweak "bootctl update" to be a NOP when boot loader is already current and...
authorLennart Poettering <lennart@poettering.net>
Fri, 2 Jul 2021 13:16:52 +0000 (15:16 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 30 Jul 2021 14:48:24 +0000 (16:48 +0200)
commite5a8b4b593e7da1823f3258f7b4e7f2d370a7c3c
treedde88b421577407040e97f72e2aa00c56f6f3d41
parent1f0fb7d544711248cba34615e43c5a76bc902d74
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)
man/bootctl.xml
src/boot/bootctl.c