Lines 51-57
fi
Link Here
|
51 |
# prepare to strip off /boot in case it's a separate filesystem |
51 |
# prepare to strip off /boot in case it's a separate filesystem |
52 |
grep -qF " /boot " /proc/mounts && FMT="%P" || FMT="%p" |
52 |
grep -qF " /boot " /proc/mounts && FMT="%P" || FMT="%p" |
53 |
|
53 |
|
54 |
printf "if [ \"\$grub_platform\" = \"pc\" ]; then\n" |
|
|
55 |
find /boot -name "memtest-*.bin" -printf "$FMT\\n" | while read memtest ; do |
54 |
find /boot -name "memtest-*.bin" -printf "$FMT\\n" | while read memtest ; do |
56 |
prepare_boot_cache= |
55 |
prepare_boot_cache= |
57 |
echo "Found memtest image: $memtest" >&2 |
56 |
echo "Found memtest image: $memtest" >&2 |
Lines 66-78
find /boot -name "memtest-*.bin" -printf "$FMT\\n" | while read memtest ; do
Link Here
|
66 |
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t\t/")" |
65 |
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t\t/")" |
67 |
fi |
66 |
fi |
68 |
|
67 |
|
|
|
68 |
printf "if [ \"\$grub_platform\" = \"pc\" ]; then\n" |
69 |
printf "\tmenuentry \"Memtest86+-$version\" {\n" |
69 |
printf "\tmenuentry \"Memtest86+-$version\" {\n" |
70 |
printf '%s\n' "${prepare_boot_cache}" |
70 |
printf '%s\n' "${prepare_boot_cache}" |
71 |
printf "\t\tlinux $rel_dirname/$basename\n" |
71 |
printf "\t\tlinux $rel_dirname/$basename\n" |
72 |
printf "\t}\n" |
72 |
printf "\t}\n" |
|
|
73 |
printf "fi\n" |
73 |
done |
74 |
done |
74 |
|
75 |
|
75 |
printf "elif [ \"\$grub_platform\" = \"efi\" ]; then\n" |
|
|
76 |
find /boot -name "memtest-*.efi" -printf "$FMT\\n" | while read memtest ; do |
76 |
find /boot -name "memtest-*.efi" -printf "$FMT\\n" | while read memtest ; do |
77 |
prepare_boot_cache= |
77 |
prepare_boot_cache= |
78 |
echo "Found memtest image: $memtest" >&2 |
78 |
echo "Found memtest image: $memtest" >&2 |
Lines 87-95
find /boot -name "memtest-*.efi" -printf "$FMT\\n" | while read memtest ; do
Link Here
|
87 |
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t\t/")" |
87 |
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t\t/")" |
88 |
fi |
88 |
fi |
89 |
|
89 |
|
|
|
90 |
printf "if [ \"\$grub_platform\" = \"efi\" ]; then\n" |
90 |
printf "\tmenuentry \"Memtest86+-$version (may not work with Secure Boot)\" {\n" |
91 |
printf "\tmenuentry \"Memtest86+-$version (may not work with Secure Boot)\" {\n" |
91 |
printf '%s\n' "${prepare_boot_cache}" |
92 |
printf '%s\n' "${prepare_boot_cache}" |
92 |
printf "\t\tlinux $rel_dirname/$basename\n" |
93 |
printf "\t\tlinux $rel_dirname/$basename\n" |
93 |
printf "\t}\n" |
94 |
printf "\t}\n" |
|
|
95 |
printf "fi\n" |
94 |
done |
96 |
done |
95 |
printf "fi\n" |
|
|
96 |
- |