memtest86plus/memtest-setup
2008-03-04 21:39:54 +00:00

31 lines
659 B
Bash
Executable File

#!/bin/bash
if [ -d /sys/firmware/efi ]; then
echo "memtest86+ does not support EFI platforms."
exit 254
fi
MTVERSION=`rpm -q --qf '%{version}' memtest86+`
MTPATH="/boot/memtest86+-$MTVERSION"
/sbin/grubby --info=$MTPATH > /dev/null 2> /dev/null
if [ "$?" = 0 ]; then
echo "$MTPATH is already configured. Exiting..."
exit 0
fi
if [ ! -f $MTPATH ]; then
echo "ERROR: $MTPATH does not exist."
exit 255
fi
/sbin/new-memtest-pkg --install $MTVERSION --banner="Memtest86+"
RETVAL="$?"
if [ "$RETVAL" != "0" ]; then
echo "ERROR: grubby failed to configure your bootloader for $MTPATH."
exit $RETVAL
fi
echo "Setup complete."