summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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