summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-13 13:23:52 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-13 13:23:52 +0000
commit794d95e5ee8251db0282ced9a390279549612b80 (patch)
tree1ea6254dc5e915ade485845921c81d7b63b63a8f
parent882f11361e45833a36d64b044af903529a40a1a3 (diff)
downloaddrakx-backup-do-not-use-794d95e5ee8251db0282ced9a390279549612b80.tar
drakx-backup-do-not-use-794d95e5ee8251db0282ced9a390279549612b80.tar.gz
drakx-backup-do-not-use-794d95e5ee8251db0282ced9a390279549612b80.tar.bz2
drakx-backup-do-not-use-794d95e5ee8251db0282ced9a390279549612b80.tar.xz
drakx-backup-do-not-use-794d95e5ee8251db0282ced9a390279549612b80.zip
Eject CD-Rom when installation is finished
-rw-r--r--perl-install/install_any.pm14
-rw-r--r--perl-install/install_steps.pm4
2 files changed, 13 insertions, 5 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 26ad0865d..e7e951dd5 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -937,11 +937,19 @@ sub ejectCdrom {
my ($o_cdrom, $o_mountpoint) = @_;
getFile("XXX"); #- close still opened filehandle
my $cdrom;
+ my $mounts = cat_("/proc/mounts");
if ($o_mountpoint) {
- $cdrom = $o_cdrom || cat_("/proc/mounts") =~ m!(/dev/\S+)\s+(/mnt/cdrom|/tmp/image)! && $1;
+ $cdrom = $o_cdrom || $mounts =~ m!(/dev/\S+)\s+(/mnt/cdrom|/tmp/image)! && $1;
} else {
- $cdrom = cat_("/proc/mounts") =~ m!((?:/dev/)?$o_cdrom)\s+(/mnt/cdrom|/tmp/image)! && $1;
- $o_mountpoint ||= $cdrom ? $2 || '/tmp/image' : '';
+ my $mntpt;
+ if ($o_cdrom) {
+ $cdrom = $mounts =~ m!((?:/dev/)?$o_cdrom)\s+(/mnt/cdrom|/tmp/image)! && $1;
+ $mntpt = $2;
+ } else {
+ $cdrom = $mounts =~ m!(/dev/\S+)\s+(/mnt/cdrom|/tmp/image)! && $1;
+ $mntpt = $2;
+ }
+ $o_mountpoint ||= $cdrom ? $mntpt || '/tmp/image' : '';
}
$cdrom ||= $o_cdrom;
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 1493fad60..a57e96631 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -966,12 +966,12 @@ Beware that some Mandrakelinux tools rely on the contents of some
of these files... so remove any file from here at your own
risk!
" };
- #- wait for remainging processes.
+ #- wait for remaining processes.
foreach (@{$o->{waitpids}}) {
waitpid $_, 0;
log::l("pid $_ returned $?");
}
- install_any::unlockCdrom();
+ install_any::ejectCdrom();
install_any::log_sizes($o);
}