Directly invoke /usr/sbin/grub-install in grml-debootstrap
authorMichael Prokop <mika@grml.org>
Mon, 16 Apr 2007 13:42:49 +0000 (15:42 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 16 Apr 2007 13:42:49 +0000 (15:42 +0200)
grml-debootstrap

index 7ca8a70..0f61061 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mon Apr 16 14:14:54 CEST 2007 [mika]
+# Latest change: Mon Apr 16 15:42:34 CEST 2007 [mika]
 ################################################################################
 # http://www.debian.org/releases/stable/i386/index.html.en
 
@@ -303,7 +303,8 @@ grub_install() {
      echo "Notice: \$GRUB or \$GROOT not defined, will not install grub therefor."
   else
      einfo "Installing grub on ${GRUB}:"
-     grub-install --root-directory="$MNTPOINT" "(${GRUB})"
+     [ -x /usr/sbin/grub-install ] && GRUBINSTALL=/usr/sbin/grub-install || GRUBINSTALL=/sbin/grub-install
+     $GRUBINSTALL --root-directory="$MNTPOINT" "(${GRUB})"
      eend $?
   fi
 }