From: Colin Watson Date: Fri, 10 Sep 2010 22:15:56 +0000 (+0100) Subject: * util/grub-install.in: Don't try to verify core.img until after X-Git-Tag: 1.99~550 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ed7d816b406f191a8f787dbac888ab0d69729ca;p=thirdparty%2Fgrub.git * util/grub-install.in: Don't try to verify core.img until after running grub-mkimage to create it. --- diff --git a/ChangeLog b/ChangeLog index 9f6c66e81..8b5a2b99c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-09-10 Colin Watson + + * util/grub-install.in: Don't try to verify core.img until after + running grub-mkimage to create it. + 2010-09-10 Robert Millan * util/grub.d/10_hurd.in: Add misc readability checks. diff --git a/util/grub-install.in b/util/grub-install.in index c30f900db..3ac7f677f 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -402,14 +402,7 @@ case "${target_cpu}-${platform}" in esac # Verify readability of a few critical files -# verify_files is a temporary workaround; drop this once the install branch -# is merged. -verify_files=grubenv -if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ]; then - verify_files="$verify_files core.img" -fi -verify_files="$verify_files normal.mod" -for file in $verify_files ; do +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 @@ -419,6 +412,13 @@ 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