-# install booloader grub {{{
-grub_install() {
- if [ -z "$GRUB" ] ; then
- echo "Notice: \$GRUB not defined, will not install grub therefore."
- 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}:"
- grub-install --no-floppy --root-directory="$MNTPOINT" "$GRUB"
- eend $?
- done
- else
- einfo "Installing grub on ${GRUB}:"
- grub-install --no-floppy --root-directory="$MNTPOINT" "$GRUB"
- eend $?
- fi
-}
-# }}}
-