summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-15 18:40:51 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-02-15 18:40:51 +0000
commit862896e25933b058f13276598add6f742ef02220 (patch)
treec0d4d9b023462b6b0aa9c84aa3846a5ae586ccd6 /perl-install/install_any.pm
parent77bf55ec6421e494138889788baedbd3be57a791 (diff)
downloaddrakx-862896e25933b058f13276598add6f742ef02220.tar
drakx-862896e25933b058f13276598add6f742ef02220.tar.gz
drakx-862896e25933b058f13276598add6f742ef02220.tar.bz2
drakx-862896e25933b058f13276598add6f742ef02220.tar.xz
drakx-862896e25933b058f13276598add6f742ef02220.zip
Fix bug 13661 : umounting a supplementary CD wasn't done cleanly after failure
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index fa2143d29..a0fe63c67 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -845,8 +845,13 @@ sub unlockCdrom() {
sub ejectCdrom {
my ($o_cdrom, $o_mountpoint) = @_;
getFile("XXX"); #- close still opened filehandle
- my $cdrom = $o_cdrom || cat_("/proc/mounts") =~ m!(/dev/\S+)\s+(/mnt/cdrom|/tmp/image)! && $1 or return;
- $o_mountpoint ||= $2 || '/tmp/image';
+ my $cdrom;
+ if ($o_mountpoint) {
+ $cdrom = $o_cdrom || cat_("/proc/mounts") =~ m!(/dev/\S+)\s+(/mnt/cdrom|/tmp/image)! && $1 or return;
+ } else {
+ $cdrom = cat_("/proc/mounts") =~ m!(/dev/$o_cdrom)\s+(/mnt/cdrom|/tmp/image)! && $1 or return;
+ $o_mountpoint ||= $2 || '/tmp/image';
+ }
#- umount BEFORE opening the cdrom device otherwise the umount will
#- D state if the cdrom is already removed