diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-01-21 19:23:18 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-01-21 19:23:18 +0000 |
commit | c4f34137b06385ba0e98a0613f9591d83be4398d (patch) | |
tree | 31ccad5002b83c25a94dc00128600b0f548ac638 /perl-install | |
parent | 21019fa1903012b169faa38a9265253d446df77d (diff) | |
download | drakx-c4f34137b06385ba0e98a0613f9591d83be4398d.tar drakx-c4f34137b06385ba0e98a0613f9591d83be4398d.tar.gz drakx-c4f34137b06385ba0e98a0613f9591d83be4398d.tar.bz2 drakx-c4f34137b06385ba0e98a0613f9591d83be4398d.tar.xz drakx-c4f34137b06385ba0e98a0613f9591d83be4398d.zip |
(setupBootloader__mbr_or_not): add ability to skip and to put on floppy
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index f6178323a..5a9464c1f 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -133,8 +133,6 @@ On which drive are you booting?"), \&partition_table::description, $hds) or retu sub setupBootloader__mbr_or_not { my ($in, $b, $hds, $fstab) = @_; - my @l = (N_("First sector of drive (MBR)"), N_("First sector of boot partition")); - $in->set_help('setupBootloaderBeginner') if !$::isStandalone; if (arch() =~ /ppc/) { if (defined $partition_table::mac::bootstrap_part) { @@ -144,16 +142,27 @@ sub setupBootloader__mbr_or_not { die "no bootstrap partition - yaboot.conf creation failed"; } } else { - my $boot = $hds->[0]{device}; - my $use_partition = arch() =~ /sparc/ ? $b->{use_partition} : "/dev/$boot" ne $b->{boot}; + my $floppy = detect_devices::floppy(); + + my @l = ( + [ N("First sector of drive (MBR)") => '/dev/' . $hds->[0]{device} ], + [ N("First sector of boot partition") => '/dev/' . fsedit::get_root($fstab, 'boot')->{device} ], + if_($floppy, + [ N("On Floppy") => "/dev/$floppy" ], + ), + [ N("Skip") => '' ], + ); + + my $default = arch() =~ /sparc/ ? ($b->{use_partition} ? $l[1] : $l[0]) : + find { $_->[1] eq $b->{boot} } @l; $in->ask_from(arch() =~ /sparc/ ? N("SILO Installation") : N("LILO/grub Installation"), N("Where do you want to install the bootloader?"), - [ { val => \$use_partition, list => [ 0, 1 ], format => sub { translate($l[$_[0]]) } } ]) or return; + [ { val => \$default, list => \@l, format => sub { $_[0][0] }, type => 'list' } ]); + my $new_boot = $default->[1] or return; + if (arch() =~ /sparc/) { - $b->{use_partition} = $use_partition; + $b->{use_partition} = $new_boot eq $l[1][1]; } else { - my $new_boot = "/dev/" . ($use_partition ? fsedit::get_root($fstab, 'boot')->{device} : $boot); - #- remove bios mapping if the user changed the boot device delete $b->{bios} if $new_boot ne $b->{boot}; |