In addition to the rename, the function was updated to be flexible with
the use of multiple bootloaders.
---
 src/core/libs/lib-ui-interactive.sh |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/core/libs/lib-ui-interactive.sh 
b/src/core/libs/lib-ui-interactive.sh
index 45d3282..a2d5759 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -886,7 +886,7 @@ interactive_grub() {
                        fi
                fi
         # Create and edit the grub menu.lst
-        interactive_grub_menulst
+        interactive_bootloader_menu "GRUB" $grubmenu 
 
        DEVS="$(findblockdevices '_ ')"
         if [ "$DEVS" = " " ]; then
@@ -1073,13 +1073,22 @@ initrd $subdir/kernel26-fallback.img
 EOF
 }
 
-interactive_grub_menulst () {
-       generate_grub_menulst
-       helptext=
-       grep -q '^/dev/mapper' $TMP_FSTAB && helptext="  /dev/mapper/ users: 
Pay attention to the kernel line!"
-       notify "Before installing GRUB, you must review the configuration file. 
 You will now be put into the editor.  After you save your changes and exit the 
editor, you can install GRUB.$helptext"
-       seteditor || return 1
-       $EDITOR $grubmenu
+interactive_bootloader_menu() {
+       # $1 - Bootloader Name
+       # $2 - Bootloader Configuration Files
+
+       if [[ $1 = GRUB ]]; then
+               generate_grub_menulst
+       fi
+       
+       grep -q '^/dev/mapper' $TMP_FSTAB && local helptext="  /dev/mapper/ 
users: Pay attention to the kernel line!"
+       notify "Before installing $1, you must review the configuration file.  
You will now be put into the editor.  After you save your changes and exit the 
editor, you can install $1.$helptext"
+       
+       if [[ -z $EDITOR ]]; then
+               seteditor || return 1
+       fi
+       
+       $EDITOR $2
 }
 
 interactive_grub_install () {
-- 
1.7.4

Reply via email to