1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #!/bin/sh
- . /usr/share/grub/grub-mkconfig_lib
- memtest=/boot/memtest86plus/memtest
- memtestbsd=/boot/memtest86plus/memtest.netbsd
- if [ -f "${memtest}" ] && [ -f "${memtestbsd}" ]; then
- multiple_memtest=true
- fi
- submenu_indentation=""
- if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
- submenu_indentation="${grub_tab}"
- cat <<EOF
- submenu 'Memtest86+' {
- EOF
- fi
- if [ -f "${memtest}" ]; then
- gettext_printf "Found memtest image: %s\n" "${memtest}" >&2
- device="$("${grub_probe}" --target=device "${memtest}")"
- path="$(make_system_path_relative_to_its_root "${memtest}")"
- cat <<EOF
- ${submenu_indentation}menuentry 'Memtest86+' {
- EOF
- if [ -n "{submenu_indentation}" ]; then
- prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
- else
- prepare_grub_to_access_device "${device}" | grub_add_tab
- fi
- cat <<EOF
- ${submenu_indentation}linux16 "${path}"
- ${submenu_indentation}}
- EOF
- fi
- if [ -f "${memtestbsd}" ]; then
- gettext_printf "Found memtest image: %s\n" "${memtestbsd}" >&2
- device="$("${grub_probe}" --target=device "${memtestbsd}")"
- path="$(make_system_path_relative_to_its_root "${memtestbsd}")"
- cat <<EOF
- ${submenu_indentation}menuentry 'Memtest86+ (netbsd)' {
- EOF
- if [ -n "${submenu_indentation}" ]; then
- prepare_grub_to_access_device "${device}" | grub_add_tab | grub_add_tab
- else
- prepare_grub_to_access_device "${device}" | grub_add_tab
- fi
- cat <<EOF
- ${submenu_indentation}knetbsd "${path}"
- ${submenu_indentation}}
- EOF
- fi
- if [ "${multiple_memtest}" = "true" ] && [ "${GRUB_DISABLE_SUBMENU}" != "y" ]; then
- cat <<EOF
- }
- EOF
- fi
|