From 5a5cd0a56317cd4f8bf6478d4bbaf8f23e63b256 Mon Sep 17 00:00:00 2001 From: "pyther@pyther.net" Date: Sun, 27 Feb 2011 17:11:22 -0500 Subject: Rename interactive_grub_menulst to interactive_bootloader_menu Update function to be flexible with the use of multiple bootloaders Signed-off-by: Dieter Plaetinck --- src/core/libs/lib-ui-interactive.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 64be570..08d1f70 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -883,7 +883,7 @@ interactive_grub() { fi fi # Create and edit the grub menu.lst - interactive_grub_menulst + interactive_bootloader_menu "grub" $grubmenu DEVS="$(find_usable_blockdevices '_ ')" if [ "$DEVS" = " " ]; then @@ -1070,15 +1070,6 @@ initrd $subdir/kernel26-fallback.img EOF } -interactive_grub_menulst () { - generate_grub_menulst - local 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_grub_install () { debug FS "interactive_grub_install called. P1 = $1, P2 = $2, P3 = $3" # $1 = bootpart @@ -1120,6 +1111,21 @@ EOF fi } +# $1 - Bootloader Name +# $2 - Bootloader Configuration Files +interactive_bootloader_menu() { + 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" + + seteditor || return 1 + + $EDITOR $2 +} + get_kernel_parameters() { get_device_with_mount '/' || return 1 local rootpart="$ANSWER_DEVICE" -- cgit v1.2.2