summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-06-04 14:24:51 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-06-05 22:28:26 +0200
commitaf74c75a0e05575958e8706fd33bd2d34b533c59 (patch)
treebce4f8bc0d581a9993c78edc769d93978750310b
parent02434012491b0ffec26bf7fd9fcbfccf4ac6280d (diff)
downloaddrakx-af74c75a0e05575958e8706fd33bd2d34b533c59.tar
drakx-af74c75a0e05575958e8706fd33bd2d34b533c59.tar.gz
drakx-af74c75a0e05575958e8706fd33bd2d34b533c59.tar.bz2
drakx-af74c75a0e05575958e8706fd33bd2d34b533c59.tar.xz
drakx-af74c75a0e05575958e8706fd33bd2d34b533c59.zip
document
-rw-r--r--perl-install/bootloader.pm31
1 files changed, 31 insertions, 0 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 7848af1a6..0d8a7c243 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1267,6 +1267,19 @@ sub method2text {
}->{$method};
}
+
+=item method_choices_raw($b_prefix_mounted)
+
+Returns list of bootloaders.
+
+method_choices_raw(1) will return the list of installed boot loaders.
+
+method_choices_raw(0) will return the list of all boot loaders supported by drakboot.
+
+Returns: ("grub2", "grub2-graphic")
+
+=cut
+
sub method_choices_raw {
my ($b_prefix_mounted) = @_;
detect_devices::is_xbox() ? 'cromwell' :
@@ -1280,6 +1293,15 @@ sub method_choices_raw {
'lilo-menu'),
));
}
+
+=item method_choices($all_hds, $b_prefix_mounted)
+
+Returns list of supported bootloaders according to what is detected.
+
+Like method_choices_raw(), the $b_prefix_mounted parameter enables to return the list of either installed supported methods or the list of all supported boot loaders.
+
+=cut
+
sub method_choices {
my ($all_hds, $b_prefix_mounted) = @_;
my $fstab = [ fs::get::fstab($all_hds) ];
@@ -1293,6 +1315,15 @@ sub method_choices {
&& !(/grub2?-graphic/ && cat_("/proc/cmdline") =~ /console=ttyS/);
} method_choices_raw($b_prefix_mounted);
}
+
+=item main_method_choices($b_prefix_mounted)
+
+Returns list of supported bootloaders, not distinging text/gfx mode.
+
+Like method_choices_raw(), the $b_prefix_mounted parameter enables to return the list of either installed supported methods or the list of all supported boot loaders.
+
+=cut
+
sub main_method_choices {
my ($b_prefix_mounted) = @_;
uniq(map { main_method($_) } method_choices_raw($b_prefix_mounted));