summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-06 00:38:57 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-06 00:38:57 +0000
commitc75193289b79d4c0687aa6a597b51436568f8360 (patch)
tree0dde0958b1d48a729e30be420f9f8c94004b7ef8 /perl-install/install_any.pm
parentc5d30320d3d120ccd291ccc7b7271400a4f20e4a (diff)
downloaddrakx-backup-do-not-use-c75193289b79d4c0687aa6a597b51436568f8360.tar
drakx-backup-do-not-use-c75193289b79d4c0687aa6a597b51436568f8360.tar.gz
drakx-backup-do-not-use-c75193289b79d4c0687aa6a597b51436568f8360.tar.bz2
drakx-backup-do-not-use-c75193289b79d4c0687aa6a597b51436568f8360.tar.xz
drakx-backup-do-not-use-c75193289b79d4c0687aa6a597b51436568f8360.zip
no_comment
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm25
1 files changed, 24 insertions, 1 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index f7743aa04..80b6f4f26 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -383,7 +383,7 @@ sub searchAndMount4Upgrade {
my ($o) = @_;
my ($root, $found);
- my $w = $::beginner && $o->wait_message('', _("Searching root partition."));
+ my $w = !$::expert && $o->wait_message('', _("Searching root partition."));
#- try to find the partition where the system is installed if beginner
#- else ask the user the right partition, and test it after.
@@ -871,4 +871,27 @@ sub generate_ks_cfg {
$ks;
}
+sub partitionWizard {
+ my ($o, $hds, $fstab, $readonly) = @_;
+ my @solutions;
+
+ # each solutions is a [ text, function ], where the function retunrs true if succeeded
+ if (fsedit::free_space(@$hds) > 500 << 11 && !$readonly) {
+ push @solutions, [ _("Use free space"), sub { fsedit::auto_allocate($hds, $o->{partitions}); 1 } ];
+ } elsif (my @l = grep { isTrueFS($_) } @$fstab) {
+ push @solutions, [ _("Use existing partition"), sub { $o->ask_mntpoint_s($o->{fstab}) } ];
+ } elsif (@l = grep { isFat($_) } @$fstab) {
+ }
+ push @solutions,
+ [ _("Take over the hard drive (beware!)"),
+ sub {
+ my $hd = $o->ask_from_listf('', _("You have more than one hard drive, which one do you install linux on?"),
+ \&partition_table_raw::description, @$hds) or return;
+ $o->ask_okcancel('', _("All existing partitions and their data will be lost on drive %s", $hd->{device})) or return;
+ partition_table_raw::zero_MBR($hd);
+ fsedit::auto_allocate($hds, $o->{partitions});
+ 1;
+ } ];
+}
+
1;