2015-04-27 17:46:41 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2015-08-08 19:51:05 +00:00
|
|
|
. /usr/share/grub/grub-mkconfig_lib
|
|
|
|
|
|
|
|
memtest=/boot/memtest86plus/memtest
|
|
|
|
|
|
|
|
if [ -f "${memtest}" ]; then
|
|
|
|
device="$("${grub_probe}" --target=device "${memtest}")"
|
|
|
|
path="$(make_system_path_relative_to_its_root "${memtest}")"
|
|
|
|
cat <<EOF
|
|
|
|
menuentry "Memtest86+" {
|
|
|
|
EOF
|
|
|
|
prepare_grub_to_access_device "${device}" | grub_add_tab
|
|
|
|
cat <<EOF
|
|
|
|
linux16 "${path}"
|
2015-04-27 17:46:41 +00:00
|
|
|
}
|
2015-08-08 19:51:05 +00:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
memtest=/boot/memtest86plus/memtest.netbsd
|
2015-04-27 17:46:41 +00:00
|
|
|
|
2015-08-08 19:51:05 +00:00
|
|
|
if [ -f "${memtest}" ]; then
|
|
|
|
device="$("${grub_probe}" --target=device "${memtest}")"
|
|
|
|
path="$(make_system_path_relative_to_its_root "${memtest}")"
|
|
|
|
cat <<EOF
|
|
|
|
menuentry "Memtest86+ (netbsd)" {
|
|
|
|
EOF
|
|
|
|
prepare_grub_to_access_device "${device}" | grub_add_tab
|
|
|
|
cat <<EOF
|
|
|
|
knetbsd "${path}"
|
2015-04-27 17:46:41 +00:00
|
|
|
}
|
2015-08-08 19:51:05 +00:00
|
|
|
EOF
|
|
|
|
fi
|