]> git.ipfire.org Git - thirdparty/systemd.git/commit
bootctl: update/list/remove all instances of systemd-boot in /EFI/BOOT
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 10 Dec 2023 21:44:25 +0000 (22:44 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 20 Dec 2023 12:56:02 +0000 (13:56 +0100)
commit929f41c6528fb630753d4e2f588a8eb6c2f6a609
treefc8b3ff1a66763e12314de4711a7101865b02798
parent3553fddb1eb173f93f25d6ba3fc9b3bfeced5662
bootctl: update/list/remove all instances of systemd-boot in /EFI/BOOT

systemd-boot might be installed in /EFI/BOOT under more names than
just /EFI/BOOT/BOOTX64.efi. The prime example is shim which loads
its second stage binary from /EFI/BOOT/grubx64.efi. To accomodate
use cases where systemd-boot is installed as /EFI/BOOT/grubx64.efi,
let's always check the entire /EFI/BOOT directory for binaries that
identify as systemd-boot and list/update/remove those as well.

Let's keep this somewhat generic though and not install ourselves as
grubx64.efi since that would mean having to check for shim which is
a can of worms we probably don't want to open.
src/boot/bootctl-install.c
src/boot/bootctl-status.c