#!/bin/sh # Detects Memtest86 bootloader on a EFI System Partition . /usr/share/os-prober/common.sh efi="$1" found= memtest86=$(find $1 -name memtest86 -type d) if [ -n "$memtest86" ]; then grep -qw lm /proc/cpuinfo && arch=x64 || arch=ia32 bdir="${memtest86##*/}" long='Memtest86 Memory Tester' short=Memtest86 path=${bdir}/boot$arch.efi found=true fi if [ -n "$found" ]; then label="$(count_next_label "$short")" result "${path}:${long}:${label}" fi exit 0