#!/bin/bash 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."