Skip to content

Commit 38a2047

Browse files
95-refind-copy-icon.install: simplify
because the uki copying logic is now in the main script we can simplify this and align it with its systemd equivalent Signed-off-by: Andrew Ammerlaan <[email protected]>
1 parent b3267c3 commit 38a2047

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

hooks/95-refind-copy-icon.install

+1-10
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,7 @@ main() {
2323

2424
[[ ${EUID} -eq 0 ]] || die "Please run this script as root"
2525

26-
for dir in /boot/EFI /boot/efi /boot /efi; do
27-
# If this kernel was moved by 90-uki-copy.install
28-
local uki_path="${dir}/EFI/Linux/gentoo-$(basename ${img#*-})"
29-
if [[ -f "${uki_path}" ]]; then
30-
cp "${REFIND_ICON}" "${uki_path%.efi}.png" || die
31-
fi
32-
done
33-
34-
if [[ -f "${img}" ]]; then
35-
# If this kernel was not moved by 90-uki-copy.install
26+
if [[ ${INSTALLKERNEL_LAYOUT} == compat || ${INSTALLKERNEL_LAYOUT} == uki ]]; then
3627
cp "${REFIND_ICON}" "${img%.efi}.png" || die "Failed to copy icon file"
3728
fi
3829
}

0 commit comments

Comments
 (0)