X-Git-Url: https://git.grml.org/?p=grml-debootstrap.git;a=blobdiff_plain;f=grml-debootstrap;h=2e386bf4be962e0f54d1ead0fcccf2687e261b03;hp=91d319c00c2be811c2b304c77a6d9f1ca0d84ebb;hb=7cc268e168259a681c0244f9d73a28b7dc4d3769;hpb=86755390622078baf777237e957a81e10fc7d3b4 diff --git a/grml-debootstrap b/grml-debootstrap index 91d319c..2e386bf 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -57,15 +57,15 @@ Configuration options: /etc/debootstrap/config -d, --confdir Place of config files for debootstrap, defaults to /etc/debootstrap - --packages[=] Install packages defined in specified list file. - --debconf[=] Pre-seed packages using specified pre-seed db file. + --packages Install packages defined in specified list file. + --debconf Pre-seed packages using specified pre-seed db file. --keep_src_list Do not overwrite user provided apt sources.list. --hostname Hostname of Debian system. --password Use specified password as password for user root. --bootappend Add specified appendline to kernel whilst booting. --chroot-scripts Execute chroot scripts from specified directory. - --pre-scripts[=] Execute scripts from specified directory (before chroot-scripts). - --scripts[=] Execute scripts from specified directory (after chroot-scripts). + --pre-scripts Execute scripts from specified directory (before chroot-scripts). + --scripts Execute scripts from specified directory (after chroot-scripts). Other options: @@ -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 }