summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpyther@pyther.net <pyther@pyther.net>2011-02-27 17:11:22 -0500
committerDieter Plaetinck <dieter@plaetinck.be>2011-02-28 21:26:07 +0100
commit5a5cd0a56317cd4f8bf6478d4bbaf8f23e63b256 (patch)
treeced25172919f9d2e58371075efe24982f6f7c1b7
parent048532662999a5f0909646f26f5368ddbf0558fa (diff)
Rename interactive_grub_menulst to interactive_bootloader_menu
Update function to be flexible with the use of multiple bootloaders Signed-off-by: Dieter Plaetinck <dieter@plaetinck.be>
-rw-r--r--src/core/libs/lib-ui-interactive.sh26
1 files 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"