summaryrefslogtreecommitdiffstats
path: root/perl-install/fs/mount.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-03-28 18:08:13 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-03-28 18:08:13 +0000
commit221d58ec842f70419060c898b9b3025b7109ea3b (patch)
treec8a661322aafa8427539abaa355b6a71b4c42bb0 /perl-install/fs/mount.pm
parent82e7fa470773e0f2cca95d3f0ac76445960bdc89 (diff)
downloaddrakx-221d58ec842f70419060c898b9b3025b7109ea3b.tar
drakx-221d58ec842f70419060c898b9b3025b7109ea3b.tar.gz
drakx-221d58ec842f70419060c898b9b3025b7109ea3b.tar.bz2
drakx-221d58ec842f70419060c898b9b3025b7109ea3b.tar.xz
drakx-221d58ec842f70419060c898b9b3025b7109ea3b.zip
- ensure umount on loopback-mounted-file doesn't leak /dev/loop
(otherwise it breaks install from isos on disk) (#36992)
Diffstat (limited to 'perl-install/fs/mount.pm')
-rw-r--r--perl-install/fs/mount.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/fs/mount.pm b/perl-install/fs/mount.pm
index e96228d75..7ca29dbda 100644
--- a/perl-install/fs/mount.pm
+++ b/perl-install/fs/mount.pm
@@ -179,6 +179,13 @@ sub part {
run_program::run('quotacheck', $mntpoint);
}
}
+ if (isLoopback($part) && $::isInstall) {
+ #- since /etc/mtab is symlinked to /proc/mounts, umount will
+ #- not be able to know it needs to do losetup -d
+ #- TODO: drop this and have a real /etc/mtab
+ $part->{real_device} = cat_("/proc/mounts") =~ m!(/dev/\S+)\s+\Q$mntpoint\E\s! && $1;
+ log::l("XXX $part->{real_device}");
+ }
}
}
$part->{isMounted} = 1;