summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2010-02-01 15:04:07 +0000
committerThierry Vignaud <tv@mandriva.org>2010-02-01 15:04:07 +0000
commitc1bb8da243e4443c9134a14e4230a8e8f449ee55 (patch)
tree6f178ea92d2154e95f89ffd2623244456dee17dd /perl-install
parenta763c2f6b76222de861766847b15ea9f4f12e69e (diff)
downloaddrakx-c1bb8da243e4443c9134a14e4230a8e8f449ee55.tar
drakx-c1bb8da243e4443c9134a14e4230a8e8f449ee55.tar.gz
drakx-c1bb8da243e4443c9134a14e4230a8e8f449ee55.tar.bz2
drakx-c1bb8da243e4443c9134a14e4230a8e8f449ee55.tar.xz
drakx-c1bb8da243e4443c9134a14e4230a8e8f449ee55.zip
(_ask_mbr_or_not) extract it out of setupBootloader__mbr_or_not()
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/any.pm22
1 files changed, 14 insertions, 8 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index f02a0b4d4..55d13d17b 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -326,6 +326,19 @@ On which drive are you booting?"), \&partition_table::description, $hds) or retu
1;
}
+sub _ask_mbr_or_not {
+ my ($in, $default, @l) = @_;
+ $in->ask_from_({ title => N("Bootloader Installation"),
+ interactive_help_id => 'setupBootloaderBeginner',
+ },
+ [
+ { label => N("Where do you want to install the bootloader?"), title => 1 },
+ { val => \$default, list => \@l, format => sub { $_[0][0] }, type => 'list' },
+ ]
+ );
+ $default;
+}
+
sub setupBootloader__mbr_or_not {
my ($in, $b, $hds, $fstab) = @_;
@@ -355,14 +368,7 @@ sub setupBootloader__mbr_or_not {
);
my $default = find { $_->[1] eq $b->{boot} } @l;
- $in->ask_from_({ title => N("Bootloader Installation"),
- interactive_help_id => 'setupBootloaderBeginner',
- },
- [
- { label => N("Where do you want to install the bootloader?"), title => 1 },
- { val => \$default, list => \@l, format => sub { $_[0][0] }, type => 'list' },
- ]
- );
+ $default = _ask_mbr_or_not($in, $default, @l);
my $new_boot = $default->[1];
#- remove bios mapping if the user changed the boot device