Remove readability checks (too many false negatives).

* util/grub-install.in: Remove readability checks.
	* util/grub-mkconfig.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub-mkconfig_lib.in (is_path_readable_by_grub): Revert to old
	way.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-09-13 22:18:03 +02:00
parent 2419f17a09
commit 3352800b99
7 changed files with 19 additions and 72 deletions

View file

@ -1,7 +1,7 @@
#! /bin/sh
# Install GRUB on your drive.
# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
# Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -327,7 +327,8 @@ if test "x$fs_module" = x -a "x$modules" = x; then
fi
# Then the partition map module. In order to support partition-less media,
# this command is allowed to fail.
# this command is allowed to fail (--target=fs already grants us that the
# filesystem will be accessible).
partmap_module=
for x in `$grub_probe --target=partmap --device ${grub_device} 2> /dev/null`; do
partmap_module="$partmap_module part_$x";
@ -405,24 +406,9 @@ case "${target_cpu}-${platform}" in
*) mkimage_target=i386-coreboot;
esac
# Verify readability of a few critical files
for file in grubenv normal.mod ; do
if is_path_readable_by_grub ${grubdir}/${file} ${grub_device} ${relative_grubdir}/${file} ; then : ; else
echo "GRUB is unable to read ${grubdir}/${file}" >&2
exit 1
fi
done
if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ] ; then
$grub_mkimage ${config_opt} -O ${mkimage_target} --output=${grubdir}/core.img --prefix=${prefix_drive}${relative_grubdir} $modules || exit 1
# This is a temporary workaround; it can be merged back into the check
# above once the install branch is merged.
if is_path_readable_by_grub ${grubdir}/core.img ${grub_device} ${relative_grubdir}/core.img ; then : ; else
echo "GRUB is unable to read ${grubdir}/core.img" >&2
exit 1
fi
# Now perform the installation.
$grub_setup ${setup_verbose} ${setup_force} --directory=${grubdir} --device-map=${device_map} \
${install_device} || exit 1