From 862896e25933b058f13276598add6f742ef02220 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Tue, 15 Feb 2005 18:40:51 +0000 Subject: Fix bug 13661 : umounting a supplementary CD wasn't done cleanly after failure --- perl-install/install_any.pm | 9 +++++++-- 1 file 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 -- cgit v1.2.1