Small eror

changed 
if [ ! "`grub-probe -d $DEVICE -t partmap`" == "msdos " ]; then
	echo "Error: $MBR does not contain a MBR style partition table." >&2
	exit 1
fi

TO

if [ ! "`grub-probe -d $DEVICE -t partmap`" == "msdos" ]; then
	echo "Error: $MBR does not contain a MBR style partition table." >&2
	exit 1
fi