From 2c4d77774c1f579de48ac3003de03398f46c4462 Mon Sep 17 00:00:00 2001 From: Anton Midyukov Date: Wed, 6 Sep 2023 14:35:16 +0700 Subject: [PATCH] 39_memtest: fix config for i586 Signed-off-by: Anton Midyukov --- altlinux/39_memtest | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/altlinux/39_memtest b/altlinux/39_memtest index c9f852348..e82273982 100755 --- a/altlinux/39_memtest +++ b/altlinux/39_memtest @@ -51,7 +51,6 @@ fi # prepare to strip off /boot in case it's a separate filesystem grep -qF " /boot " /proc/mounts && FMT="%P" || FMT="%p" -printf "if [ \"\$grub_platform\" = \"pc\" ]; then\n" find /boot -name "memtest-*.bin" -printf "$FMT\\n" | while read memtest ; do prepare_boot_cache= echo "Found memtest image: $memtest" >&2 @@ -66,13 +65,14 @@ find /boot -name "memtest-*.bin" -printf "$FMT\\n" | while read memtest ; do prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t\t/")" fi + printf "if [ \"\$grub_platform\" = \"pc\" ]; then\n" printf "\tmenuentry \"Memtest86+-$version\" {\n" printf '%s\n' "${prepare_boot_cache}" printf "\t\tlinux $rel_dirname/$basename\n" printf "\t}\n" + printf "fi\n" done -printf "elif [ \"\$grub_platform\" = \"efi\" ]; then\n" find /boot -name "memtest-*.efi" -printf "$FMT\\n" | while read memtest ; do prepare_boot_cache= echo "Found memtest image: $memtest" >&2 @@ -87,9 +87,10 @@ find /boot -name "memtest-*.efi" -printf "$FMT\\n" | while read memtest ; do prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t\t/")" fi + printf "if [ \"\$grub_platform\" = \"efi\" ]; then\n" printf "\tmenuentry \"Memtest86+-$version (may not work with Secure Boot)\" {\n" printf '%s\n' "${prepare_boot_cache}" printf "\t\tlinux $rel_dirname/$basename\n" printf "\t}\n" + printf "fi\n" done -printf "fi\n" -- 2.33.8