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

@ -30,9 +30,6 @@ fi
if test "x$grub_mkrelpath" = x; then
grub_mkrelpath=${bindir}/`echo grub-mkrelpath | sed ${transform}`
fi
if test "x$grub_fstest" = x; then
grub_fstest=${bindir}/`echo grub-fstest | sed ${transform}`
fi
if $(which gettext >/dev/null 2>/dev/null) ; then
gettext="gettext"
@ -53,24 +50,14 @@ make_system_path_relative_to_its_root ()
is_path_readable_by_grub ()
{
path=$1
device=$2
relpath=$3
# abort if path doesn't exist
if test -e $path ; then : ;else
return 1
fi
if [ "${device}" = "" ] ; then
device=$(${grub_probe} --target=device $path)
fi
if [ "${relpath}" = "" ] ; then
relpath=$(${grub_mkrelpath} $path)
fi
# abort if file read through GRUB doesn't match file read through system
# facilities
if ${grub_fstest} $device cmp $relpath $path > /dev/null 2>&1 ; then : ; else
# abort if file is in a filesystem we can't read
if ${grub_probe} -t fs $path > /dev/null 2>&1 ; then : ; else
return 1
fi