summaryrefslogtreecommitdiffstats
path: root/perl-install/install2.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-09-20 12:36:37 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-09-20 12:36:37 +0000
commit56c1b0d4fe9f5a9908827a51b22fa53dd0265bbd (patch)
treeeb38202994e13fa1b45ad115db0d73ac7aaec88f /perl-install/install2.pm
parent70c400f9a433cb7139c3c30e3cd8aaf350613483 (diff)
downloaddrakx-backup-do-not-use-56c1b0d4fe9f5a9908827a51b22fa53dd0265bbd.tar
drakx-backup-do-not-use-56c1b0d4fe9f5a9908827a51b22fa53dd0265bbd.tar.gz
drakx-backup-do-not-use-56c1b0d4fe9f5a9908827a51b22fa53dd0265bbd.tar.bz2
drakx-backup-do-not-use-56c1b0d4fe9f5a9908827a51b22fa53dd0265bbd.tar.xz
drakx-backup-do-not-use-56c1b0d4fe9f5a9908827a51b22fa53dd0265bbd.zip
no_comment
Diffstat (limited to 'perl-install/install2.pm')
-rw-r--r--perl-install/install2.pm23
1 files changed, 18 insertions, 5 deletions
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index d308fe8e5..c0a4e2178 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -62,6 +62,7 @@ for (my $i = 0; $i < @installSteps; $i += 2) {
my %h; @h{@installStepsFields} = @{ $installSteps[$i + 1] };
$h{help} = $help::steps{$installSteps[$i]} || __("Help");
$h{next} = $installSteps[$i + 2];
+ $h{entered} = 0;
$h{onError} = $installSteps[$i + 2 * $h{onError}];
$installSteps{ $installSteps[$i] } = \%h;
push @orderedInstallSteps, $installSteps[$i];
@@ -233,6 +234,7 @@ sub selectInstallClass {
$::expert = $o->{installClass} eq "expert";
$::beginner = $o->{installClass} eq "beginner";
$o->{partitions} ||= $suggestedPartitions{$o->{installClass}};
+ $o->{partitioning}{auto_allocate} = 1;
$o->setPackages(\@install_classes) if $o->{steps}{choosePackages}{entered} >= 1;
}
@@ -266,7 +268,12 @@ I'll try to go on blanking bad partitions"));
}
eval { fsedit::auto_allocate($o->{hds}, $o->{partitions}) } if $o->{partitioning}{auto_allocate};
- $o->doPartitionDisks($o->{hds});
+
+ if ($o->{partitioning}{auto_allocated} = ($::beginner && fsedit::get_root_($o->{hds}) && $_[1] == 1)) {
+ install_steps::doPartitionDisks($o, $o->{hds});
+ } else {
+ $o->doPartitionDisks($o->{hds});
+ }
unless ($::testing) {
$o->rebootNeeded foreach grep { $_->{rebootNeeded} } @{$o->{hds}};
@@ -274,14 +281,16 @@ I'll try to go on blanking bad partitions"));
$o->{fstab} = [ fsedit::get_fstab(@{$o->{hds}}) ];
- my $root_fs; map { $_->{mntpoint} eq '/' and $root_fs = $_ } @{$o->{fstab}};
- $root_fs or die _("partitioning failed: no root filesystem");
+ fsedit::get_root($o->{fstab}) or die _("partitioning failed: no root filesystem");
}
sub formatPartitions {
- $o->choosePartitionsToFormat($o->{fstab});
-
+ if ($o->{partitioning}{auto_allocated}) { #- if all was auto_allocated, no need to ask, go on!
+ install_steps::choosePartitionsToFormat($o, $o->{fstab});
+ } else {
+ $o->choosePartitionsToFormat($o->{fstab});
+ }
unless ($::testing) {
$o->formatPartitions(@{$o->{fstab}});
fs::mount_all([ grep { isExt2($_) || isSwap($_) } @{$o->{fstab}} ], $o->{prefix});
@@ -474,6 +483,10 @@ sub main {
last if $o->{step} eq 'exitInstall';
}
+
+ fs::write($o->{prefix}, $o->{fstab});
+ modules::write_conf("$o->{prefix}/etc/conf.modules", 'append');
+
killCardServices();
log::l("installation complete, leaving");