summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-08-24 12:43:42 +0000
committerFrancois Pons <fpons@mandriva.com>2001-08-24 12:43:42 +0000
commitb38e40057b5d8a22c230520b54b37fd74d6f9933 (patch)
tree6e915ad4b7abd1fbef28b6573bb222a2b54d5d10 /perl-install/fs.pm
parentce3d76402238df340a784d56b49a7790e5405aba (diff)
downloaddrakx-b38e40057b5d8a22c230520b54b37fd74d6f9933.tar
drakx-b38e40057b5d8a22c230520b54b37fd74d6f9933.tar.gz
drakx-b38e40057b5d8a22c230520b54b37fd74d6f9933.tar.bz2
drakx-b38e40057b5d8a22c230520b54b37fd74d6f9933.tar.xz
drakx-b38e40057b5d8a22c230520b54b37fd74d6f9933.zip
fixed partition never seen as mounted, added special case for real_mntpoint to
remount magic partition on the right place.
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm17
1 files changed, 15 insertions, 2 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 0a3e868bb..4cb694561 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -42,7 +42,7 @@ sub read_fstab {
}
if ($dev =~ m,/(tmp|dev)/,) {
- if (readlink($dev) !~ m|/|) {
+ if (readlink($dev) =~ m|^[^/]+$|) {
$dev = readlink($dev);
} else {
$dev =~ s,/(tmp|dev)/,,;
@@ -93,6 +93,10 @@ sub merge_info_from_mtab {
my @l2 = map { read_fstab($_) } '/etc/mtab', '/proc/mounts';
foreach (@l1, @l2) {
+ if ($::isInstall && $_->{mntpoint} eq '/tmp/hdimage') {
+ $_->{real_mntpoint} = delete $_->{mntpoint};
+ $_->{mntpoint} = "/mnt/hd"; #- remap for hd install.
+ }
$_->{isMounted} = $_->{isFormatted} = 1;
delete $_->{options};
}
@@ -565,6 +569,15 @@ sub mount_part {
#- root carrier's link can't be mounted
loopback::carryRootCreateSymlink($part, $prefix);
+ if ($part->{isMounted} && $part->{real_mntpoint}) {
+ log::l("remounting partition on $prefix$part->{mntpoint} instead of $part->{real_mntpoint}");
+ umount($part->{real_mntpoint});
+ rmdir $part->{real_mntpoint};
+ symlinkf "$prefix$part->{mntpoint}", $part->{real_mntpoint};
+ delete $part->{real_mntpoint};
+ $part->{isMounted} = 0;
+ }
+
return if $part->{isMounted};
unless ($::testing) {
@@ -591,7 +604,7 @@ sub mount_part {
sub umount_part {
my ($part, $prefix) = @_;
- $part->{isMounted} or return;
+ $part->{isMounted} || $part->{real_mntpoint} or return;
unless ($::testing) {
if (isSwap($part)) {