From dbfdf41b5995d16322bba7392a61eb6304d3e66e Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Tue, 19 Jan 2021 15:17:55 -0500 Subject: [PATCH] Fix detection of UEFI stub on split-usr systems systemd installs the stub in ${prefix}/lib/systemd/boot/efi. systemdutildir is ${rootprefix}/lib/systemd. When prefix != rootprefix, the dracut code failed to find the stub. This failure is apparent on split-usr systems where rootprefix is empty and prefix=/usr. Bug: https://bugs.gentoo.org/765208 Signed-off-by: Mike Gilbert --- dracut.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dracut.sh b/dracut.sh index 0f464839..80619381 100755 --- a/dracut.sh +++ b/dracut.sh @@ -1179,11 +1179,11 @@ if [[ ! $print_cmdline ]]; then esac if ! [[ -s $uefi_stub ]]; then - for uefi_stub in \ - $dracutsysrootdir"${systemdutildir}/boot/efi/linux${EFI_MACHINE_TYPE_NAME}.efi.stub" \ - "$dracutsysrootdir/usr/lib/gummiboot/linux${EFI_MACHINE_TYPE_NAME}.efi.stub"; do - [[ -s $uefi_stub ]] || continue - break + for uefi_stub_path in /usr/lib/systemd/boot/efi /usr/lib/gummiboot; do + uefi_stub=$dracutsysrootdir$uefi_stub_path/linux${EFI_MACHINE_TYPE_NAME}.efi.stub + if [[ -s $uefi_stub ]]; then + break + fi done fi if ! [[ -s $uefi_stub ]]; then -- 2.30.0