diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-02-15 18:40:51 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-02-15 18:40:51 +0000 |
commit | 862896e25933b058f13276598add6f742ef02220 (patch) | |
tree | c0d4d9b023462b6b0aa9c84aa3846a5ae586ccd6 | |
parent | 77bf55ec6421e494138889788baedbd3be57a791 (diff) | |
download | drakx-backup-do-not-use-862896e25933b058f13276598add6f742ef02220.tar drakx-backup-do-not-use-862896e25933b058f13276598add6f742ef02220.tar.gz drakx-backup-do-not-use-862896e25933b058f13276598add6f742ef02220.tar.bz2 drakx-backup-do-not-use-862896e25933b058f13276598add6f742ef02220.tar.xz drakx-backup-do-not-use-862896e25933b058f13276598add6f742ef02220.zip |
Fix bug 13661 : umounting a supplementary CD wasn't done cleanly after failure
-rw-r--r-- | perl-install/install_any.pm | 9 |
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 |