kernel-install: Remove existing loader entries and UKIs
authorJörg Behrmann <behrmann@physik.fu-berlin.de>
Fri, 12 Jul 2024 08:43:54 +0000 (10:43 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 15 Jul 2024 08:16:36 +0000 (10:16 +0200)
commit99d4575e541fa1fb00dc80f7aad572f3a66db461
tree1a2c41c4efe7e006e464ea702120675be9d40912
parenta31d32f6c4f6c179ffb95509afad8e5b992f8ddd
kernel-install: Remove existing loader entries and UKIs

When boot counting is enabled, adding a new loader entry or UKI can conflict
with an existing one that has booted successfully and therefore has its boot
counter removed. systemd-bless-boot will fail to bless the new successful boot,
since a file without a boot counter already exists. Since kernel-install will
clobber existing files without boot counting, we should therefore remove files
without a boot count as well, when we add a file with one.

Fixes: #33504
src/kernel-install/90-loaderentry.install.in
src/kernel-install/90-uki-copy.install