You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-apps/memtest86-bin/files/memtest86-bin-grub.d

22 lines
467 B

#!/bin/sh
. /usr/share/grub/grub-mkconfig_lib
memtest_efi=/boot/memtest86-bin.efi
if [ -f "${memtest_efi}" ]; then
echo "Found MemTest86-EFI" >&2
device="$("${grub_probe}" --target=device "${memtest_efi}")"
path="$(make_system_path_relative_to_its_root "${memtest_efi}")"
cat <<EOF
if [ "x\$grub_platform" = xefi ]; then
menuentry "MemTest86-EFI" {
EOF
prepare_grub_to_access_device "${device}" | grub_add_tab
cat <<EOF
chainloader "${path}"
}
fi
EOF
fi