[Lunar-commits] <lunar-iso> Ask where to install grub2 MBR

Stefan Wold ratler at lunar-linux.org
Sun Jan 12 18:32:47 CET 2014


commit 2411e9219353f9ae705b2e6ccd7e070e96942d7b
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sun, 12 Jan 2014 09:31:10 -0800
URL: https://github.com/lunar-linux/lunar-iso/commit/2411e9219353f9ae705b2e6ccd7e070e96942d7b

Ask where to install grub2 MBR
---
  lunar-install/sbin/lunar-install | +11/-2    
  1 file changed, 11 insertions(+), 2 deletions(-)

--- a/lunar-install/sbin/lunar-install
+++ b/lunar-install/sbin/lunar-install
@@ -881,14 +881,23 @@ make_lilo_conf()
 
 install_grub2()
 {
+  local DISC MBR
+
   if ! pkg_avail grub2 ; then
     return
   fi
 
   DISC=$(echo $ROOT | sed 's/[0-9]*$//')
-  chroot_run grub-install $DISC
+   MBR=$($DIALOG --title "grub2 MBR install" --menu "" 0 0 0 \
+    "$DISC" "Install grub2 MBR on this device" \
+    "C"     "Change grub2 MBR install device")
+  if [ "$MBR" = "C" ]; then
+    MBR=$(inputbox "Please enter a device where to install the grub2 MBR" "")
+  fi
+
+  chroot_run grub-install $MBR
 
-  echo "grub was installed on the MBR of $DISC"
+  echo "grub was installed on the MBR of $MBR"
   sleep 4
 }
 




More information about the Lunar-commits mailing list