blob: 10e1964cb8dfab40cba92b1c045b64199004c04a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
#!/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 [ "x${multiple_memtest}" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; 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 [ "x${submenu_indentation}" != "x" ]; 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 [ "x${submenu_indentation}" != "x" ]; 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 [ "x${multiple_memtest}" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
cat <<EOF
}
EOF
fi
|