summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-10-08 22:00:52 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-10-08 22:00:52 +0000
commitfc479b2a46849ffe42eb17a3162a38e27900fe93 (patch)
tree571baaa9ab25ea06b356db9ede64b51a0de5ae87 /perl-install/install_steps.pm
parented6bcf695365fcf77850639267fa3c3633429d86 (diff)
downloaddrakx-backup-do-not-use-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar
drakx-backup-do-not-use-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar.gz
drakx-backup-do-not-use-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar.bz2
drakx-backup-do-not-use-fc479b2a46849ffe42eb17a3162a38e27900fe93.tar.xz
drakx-backup-do-not-use-fc479b2a46849ffe42eb17a3162a38e27900fe93.zip
no_comment
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm37
1 files changed, 32 insertions, 5 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index d736aeee2..464e564ef 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -105,6 +105,27 @@ sub doPartitionDisks($$) {
}
#------------------------------------------------------------------------------
+
+sub ask_mntpoint_s {
+ my ($o, $fstab) = @_;
+
+ #- TODO: set the mntpoints
+
+ #- assure type is at least ext2
+ (fsedit::get_root($fstab) || {})->{type} = 0x83;
+
+ my %m; foreach (@$fstab) {
+ my $m = $_->{mntpoint} or next;
+
+ $m{$m} and die _("Duplicate mount point %s", $m);
+ $m{$m} = 1;
+
+ #- in case the type does not correspond, force it to ext2
+ $_->{type} = 0x83 if $m =~ m|^/| && !isDos($_) && !isWin($_)
+ }
+}
+
+
sub rebootNeeded($) {
my ($o) = @_;
log::l("Rebooting...");
@@ -114,11 +135,17 @@ sub rebootNeeded($) {
sub choosePartitionsToFormat($$) {
my ($o, $fstab) = @_;
- $_->{mntpoint} = "swap" foreach grep { isSwap($_) } @$fstab;
- $_->{toFormat} = $_->{mntpoint} &&
- (fsedit::typeOfPart($_->{device}) != $_->{type} ||
- $_->{notFormatted} ||
- $o->{partitioning}{autoformat}) foreach @$fstab;
+ foreach (@$fstab) {
+ $_->{mntpoint} = "swap" if isSwap($_);
+ $_->{mntpoint} or next;
+
+ unless ($_->{toFormat} = $_->{notFormatted} || $o->{partitioning}{autoformat}) {
+ my $t = fsedit::typeOfPart($_->{device});
+ $_->{toFormatUnsure} =
+ #- if detected dos/win, it's not precise enough to just compare the types (too many of them)
+ isDos({ type => $t }) || isWin({type => $t}) ? !isDos($_) && !isWin($_) : $t != $_->{type};
+ }
+ }
}
sub formatPartitions {