summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-08-28 21:59:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-08-28 21:59:42 +0000
commitb20d62cf6f8493cc79c9e8b25e39d2bb5bbd735b (patch)
treea1fe993847fac0fc886781d81eb4d457f87fdd4e /perl-install/install_steps.pm
parent0f5a62084c1d79c970efbcd9365c6c91a1b8a123 (diff)
downloaddrakx-b20d62cf6f8493cc79c9e8b25e39d2bb5bbd735b.tar
drakx-b20d62cf6f8493cc79c9e8b25e39d2bb5bbd735b.tar.gz
drakx-b20d62cf6f8493cc79c9e8b25e39d2bb5bbd735b.tar.bz2
drakx-b20d62cf6f8493cc79c9e8b25e39d2bb5bbd735b.tar.xz
drakx-b20d62cf6f8493cc79c9e8b25e39d2bb5bbd735b.zip
no_comment
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index d74e33b94..b8e4d07c6 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -127,7 +127,7 @@ sub doPartitionDisksBefore {
my ($o) = @_;
if (cat_("/proc/mounts") =~ m|/\w+/(\S+)\s+/tmp/hdimage\s+(\S+)| && !$o->{partitioning}{readonly}) {
- $o->{stage1_hd} = { dev => $1, fs => $2 };
+ $o->{stage1_hd} = { device => $1, type => $2 };
install_any::getFile("XXX"); #- close still opened filehandle
eval { fs::umount("/tmp/hdimage") };
}
@@ -143,13 +143,17 @@ sub doPartitionDisksAfter {
partition_table::write($_) foreach @{$o->{hds}};
$_->{rebootNeeded} and $o->rebootNeeded foreach @{$o->{hds}};
}
- if (my $s = delete $o->{stage1_hd}) {
- eval { fs::mount($s->{dev}, "/tmp/hdimage", $s->{fs}) };
- }
$o->{fstab} = [ fsedit::get_fstab(@{$o->{hds}}, $o->{raid}) ];
fsedit::get_root($o->{fstab}) or die "Oops, no root partition";
+ if (my $s = delete $o->{stage1_hd}) {
+ my ($part) = grep { $_->{device} eq $s->{device} } @{$o->{fstab}};
+ $part->{isMounted} ?
+ symlinkf("$o->{prefix}$part->{mntpoint}", "/tmp/hdimage") :
+ eval { fs::mount($s->{dev}, "/tmp/hdimage", $s->{fs}) };
+ }
+
cat_("/proc/mounts") =~ m|(\S+)\s+/tmp/rhimage nfs| &&
!grep { $_->{mntpoint} eq "/mnt/nfs" } @{$o->{manualFstab} || []} and
push @{$o->{manualFstab}}, { type => "nfs", mntpoint => "/mnt/nfs", device => $1, options => "noauto,ro,nosuid,rsize=8192,wsize=8192" };