X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=1e6f49cb6d9bd4b609a9be4f684e39780c826bbb;hp=91d319c00c2be811c2b304c77a6d9f1ca0d84ebb;hb=0fda360ab5986be65e7ef7354ad92b9ead7e5d85;hpb=86755390622078baf777237e957a81e10fc7d3b4 diff --git a/grml-debootstrap b/grml-debootstrap index 91d319c..1e6f49c 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -922,18 +922,21 @@ grub_install() { return 0 fi + if ! [ -x "$(which grub-install)" ] ; then + echo "Error: grub-install not available. (Error while installing grub package?)" + return 1 + fi + if [ -n "$SELECTED_PARTITIONS" ] ; then # using sw-raid for device in $SELECTED_PARTITIONS ; do GRUB="${device%%[0-9]}" einfo "Installing grub on ${GRUB}:" - [ -x /usr/sbin/grub-install ] && GRUBINSTALL="/usr/sbin/grub-install --no-floppy" || GRUBINSTALL="/sbin/grub-install --no-floppy" - $GRUBINSTALL --root-directory="$MNTPOINT" "$GRUB" + grub-install --no-floppy --root-directory="$MNTPOINT" "$GRUB" eend $? done else einfo "Installing grub on ${GRUB}:" - [ -x /usr/sbin/grub-install ] && GRUBINSTALL="/usr/sbin/grub-install --no-floppy" || GRUBINSTALL="/sbin/grub-install --no-floppy" - $GRUBINSTALL --root-directory="$MNTPOINT" "$GRUB" + grub-install --no-floppy --root-directory="$MNTPOINT" "$GRUB" eend $? fi }