diff options
author | Pascal Rigaux <pixel@mandriva.com> | 1999-10-08 22:00:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 1999-10-08 22:00:52 +0000 |
commit | fc479b2a46849ffe42eb17a3162a38e27900fe93 (patch) | |
tree | 571baaa9ab25ea06b356db9ede64b51a0de5ae87 /perl-install/install_steps_interactive.pm | |
parent | ed6bcf695365fcf77850639267fa3c3633429d86 (diff) | |
download | drakx-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar drakx-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar.gz drakx-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar.bz2 drakx-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar.xz drakx-fc479b2a46849ffe42eb17a3162a38e27900fe93.zip |
no_comment
Diffstat (limited to 'perl-install/install_steps_interactive.pm')
-rw-r--r-- | perl-install/install_steps_interactive.pm | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index 91943cd69..8498f6320 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -125,28 +125,28 @@ sub ask_mntpoint_s { @fstab = grep { !isSwap($_) } @$fstab if @fstab == 0; @fstab = @$fstab if @fstab == 0; die _("no available partitions") if @fstab == 0; + + my $msg = sub { "$_->{device} " . _("(%dMb)", $_->{size} / 1024 / 2) }; if (@fstab == 1) { $fstab[0]->{mntpoint} = '/'; } elsif ($::beginner) { - my %l; $l{"$_->{device} " . _("(%dMb)", $_->{size} / 1024 / 2)} = $_ foreach @fstab; + my %l; $l{&$msg} = $_ foreach @fstab; my $e = $o->ask_from_list('', _("Which partition do you want to use as your root partition"), [ keys %l ]); (fsedit::get_root($fstab) || {})->{mntpoint} = ''; $l{$e}{mntpoint} = '/'; } else { - $o->ask_from_entries_ref('', - _("Choose the mount points"), - [ map { $_->{device} } @fstab ], - [ map { \$_->{mntpoint} } @fstab ]); + $o->ask_from_entries_ref + ('', + _("Choose the mount points"), + [ map { &$msg } @fstab ], + [ map { +{ val => \$_->{mntpoint}, + list => [ '', fsedit::suggestions_mntpoint([]) ] + } } @fstab ]); } - #- assure type is at least ext2 - (fsedit::get_root($fstab) || {})->{type} = 0x83; - - $_->{mntpoint} && $_->{mntpoint} =~ m|^/| - && !isDos($_) && !isWin($_) - and $_->{type} = 0x83 foreach @$fstab; + $o->SUPER::ask_mntpoint_s($fstab); } #------------------------------------------------------------------------------ @@ -166,6 +166,8 @@ sub choosePartitionsToFormat($$) { return if $::beginner && 0 == grep { ! $_->{toFormat} } @l; + $_->{toFormat} ||= $_->{toFormatUnsure} foreach @l; + $o->ask_many_from_list_ref('', _("Choose the partitions you want to format"), [ map { isSwap($_) ? type2name($_->{type}) . " ($_->{device})" : $_->{mntpoint} } @l ], [ map { \$_->{toFormat} } @l ]) or die "cancel"; |