]> git.proxmox.com Git - grub2.git/commitdiff
* util/grub-install.in: Add `|| exit 1' to all grub-probe calls
authorGrégoire Sutre <gregoire.sutre@gmail.com>
Sat, 3 Apr 2010 18:52:06 +0000 (20:52 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 3 Apr 2010 18:52:06 +0000 (20:52 +0200)
for which failure is fatal.

ChangeLog
util/grub-install.in

index fbfefad82351834edb635ac6188c7cb6ba3d2ae9..d679336aa3f4a585011c9578e34c09d9e2387a80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-03  Grégoire Sutre  <gregoire.sutre@gmail.com>
+
+       * util/grub-install.in: Add `|| exit 1' to all grub-probe calls
+       for which failure is fatal.
+
 2010-04-03  Grégoire Sutre  <gregoire.sutre@gmail.com>
 
        * util/grub-install.in: Use mkdir -p to create grub directory.
index 790b56ff6d2449d19ba37cb885ad6a06afe8847a..142d5792f0c2bb20a38cff8f83142837fb3ba468 100644 (file)
@@ -270,7 +270,7 @@ for dir in ${localedir}/*; do
 done
 
 # Write device to a variable so we don't have to traverse /dev every time.
-grub_device=`$grub_probe --target=device ${grubdir}`
+grub_device=`$grub_probe --target=device ${grubdir}` || exit 1
 
 if ! test -f ${grubdir}/grubenv; then
     $grub_editenv ${grubdir}/grubenv create
@@ -312,11 +312,11 @@ if [ "x${devabstraction_module}" = "x" ] ; then
       if echo "${install_device}" | grep -qx "(.*)" ; then
         install_drive="${install_device}"
       else
-        install_drive="`$grub_probe --target=drive --device ${install_device}`"
+        install_drive="`$grub_probe --target=drive --device ${install_device}`" || exit 1
       fi
       install_drive="`echo ${install_drive} | sed -e s/,[0-9]*[a-z]*//g`"
     fi
-    grub_drive="`$grub_probe --target=drive --device ${grub_device}`"
+    grub_drive="`$grub_probe --target=drive --device ${grub_device}`" || exit 1
 
     # Strip partition number
     grub_drive="`echo ${grub_drive} | sed -e s/,[0-9]*[a-z]*//g`"
@@ -343,7 +343,7 @@ if [ "x${devabstraction_module}" = "x" ] ; then
         modules="$modules search_fs_uuid"
     fi
 else
-    prefix_drive=`$grub_probe --target=drive --device ${grub_device}`
+    prefix_drive=`$grub_probe --target=drive --device ${grub_device}` || exit 1
 fi
 
 if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ] ; then