]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* util/grub-install.in: Don't try to verify core.img until after
authorColin Watson <cjwatson@ubuntu.com>
Fri, 10 Sep 2010 22:15:56 +0000 (23:15 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Fri, 10 Sep 2010 22:15:56 +0000 (23:15 +0100)
running grub-mkimage to create it.

ChangeLog
util/grub-install.in

index 9f6c66e816704f24401f4a2cd96c7c473e457af7..8b5a2b99cd94bfd2939eaf4df7b9a36537e985a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-10  Colin Watson  <cjwatson@ubuntu.com>
+
+       * util/grub-install.in: Don't try to verify core.img until after
+       running grub-mkimage to create it.
+
 2010-09-10  Robert Millan  <rmh@gnu.org>
 
        * util/grub.d/10_hurd.in: Add misc readability checks.
index c30f900dbfee9bd85c084ba9c6c3eae48d5dc30e..3ac7f677fc97fc2ae448646a730b897447fd8f83 100644 (file)
@@ -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