* util/grub-install.in: Add `|| exit 1' to all grub-probe calls
for which failure is fatal.
This commit is contained in:
parent
50479febcf
commit
b9396631bc
2 changed files with 9 additions and 4 deletions
|
@ -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>
|
2010-04-03 Grégoire Sutre <gregoire.sutre@gmail.com>
|
||||||
|
|
||||||
* util/grub-install.in: Use mkdir -p to create grub directory.
|
* util/grub-install.in: Use mkdir -p to create grub directory.
|
||||||
|
|
|
@ -270,7 +270,7 @@ for dir in ${localedir}/*; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Write device to a variable so we don't have to traverse /dev every time.
|
# 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
|
if ! test -f ${grubdir}/grubenv; then
|
||||||
$grub_editenv ${grubdir}/grubenv create
|
$grub_editenv ${grubdir}/grubenv create
|
||||||
|
@ -312,11 +312,11 @@ if [ "x${devabstraction_module}" = "x" ] ; then
|
||||||
if echo "${install_device}" | grep -qx "(.*)" ; then
|
if echo "${install_device}" | grep -qx "(.*)" ; then
|
||||||
install_drive="${install_device}"
|
install_drive="${install_device}"
|
||||||
else
|
else
|
||||||
install_drive="`$grub_probe --target=drive --device ${install_device}`"
|
install_drive="`$grub_probe --target=drive --device ${install_device}`" || exit 1
|
||||||
fi
|
fi
|
||||||
install_drive="`echo ${install_drive} | sed -e s/,[0-9]*[a-z]*//g`"
|
install_drive="`echo ${install_drive} | sed -e s/,[0-9]*[a-z]*//g`"
|
||||||
fi
|
fi
|
||||||
grub_drive="`$grub_probe --target=drive --device ${grub_device}`"
|
grub_drive="`$grub_probe --target=drive --device ${grub_device}`" || exit 1
|
||||||
|
|
||||||
# Strip partition number
|
# Strip partition number
|
||||||
grub_drive="`echo ${grub_drive} | sed -e s/,[0-9]*[a-z]*//g`"
|
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"
|
modules="$modules search_fs_uuid"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
prefix_drive=`$grub_probe --target=drive --device ${grub_device}`
|
prefix_drive=`$grub_probe --target=drive --device ${grub_device}` || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ] ; then
|
if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ] ; then
|
||||||
|
|
Loading…
Reference in a new issue