updated on Thu Jan 26 00:18:00 UTC 2012
[aur-mirror.git] / burg-bzr / 20_memtest86+
blob12250d6639ab1a4627b69c84ca3902e13922736c
1 #! /bin/sh -e
2 ########################################################
3 # This script generates a memtest86+ entry on grub.cfg #
4 # if memtest is installed on the system. #
5 ########################################################
7 prefix=/usr
8 exec_prefix=${prefix}
9 libdir=${exec_prefix}/lib
11 . ${libdir}/burg/burg-mkconfig_lib
13 MEMTEST86_IMAGE="/boot/memtest86+/memtest.bin"
14 CLASS="--class memtest86 --class gnu --class tool"
16 if [ -e $MEMTEST86_IMAGE ] && is_path_readable_by_grub $MEMTEST86_IMAGE; then
17 # image exists, create menu entry
18 echo "Found memtest86+ image: $MEMTEST86_IMAGE" >&2
19 cat << EOF
20 menuentry "Memory test (memtest86+)" $CLASS {
21 EOF
22 prepare_grub_to_access_device `${grub_probe} --target=device $MEMTEST86_IMAGE` | sed -e "s/^/ /"
23 cat << EOF
24 linux16 (\$root)`make_system_path_relative_to_its_root $MEMTEST86_IMAGE`
26 EOF