diff options
author | Francois Pons <fpons@mandriva.com> | 2001-06-05 16:45:48 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2001-06-05 16:45:48 +0000 |
commit | 1f62beedf81f47538f0610a8f5cd7e4f52f2dca1 (patch) | |
tree | d0dbcf7c6f52a8d3c519a5cd00cad26f6506d88c /perl-install/install_any.pm | |
parent | ebf8b4f27c85fce7f150373e4390002a12cd335a (diff) | |
download | drakx-1f62beedf81f47538f0610a8f5cd7e4f52f2dca1.tar drakx-1f62beedf81f47538f0610a8f5cd7e4f52f2dca1.tar.gz drakx-1f62beedf81f47538f0610a8f5cd7e4f52f2dca1.tar.bz2 drakx-1f62beedf81f47538f0610a8f5cd7e4f52f2dca1.tar.xz drakx-1f62beedf81f47538f0610a8f5cd7e4f52f2dca1.zip |
fixed non ejection of cdrom at end of install, cleaned regexp used.
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r-- | perl-install/install_any.pm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index bcd30e39d..6dba93a48 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -85,7 +85,7 @@ sub errorOpeningFile($) { my $max = 32; #- always refuse after $max tries. if ($::o->{method} eq "cdrom") { - cat_("/proc/mounts") =~ m,(/(?:dev|tmp)/\S+)\s+/tmp/image, and $cdrom = $1; + cat_("/proc/mounts") =~ m,(/(?:dev|tmp)/\S+)\s+(?:/mnt/cdrom|/tmp/image), and $cdrom = $1; return unless $cdrom; ejectCdrom($cdrom); while ($max > 0 && askChangeMedium($::o->{method}, $asked_medium)) { @@ -457,14 +457,12 @@ sub hdInstallPath() { sub unlockCdrom(;$) { my ($cdrom) = @_; - $cdrom or cat_("/proc/mounts") =~ m|(/tmp/\S+)\s+/tmp/image| and $cdrom = $1; - $cdrom or cat_("/proc/mounts") =~ m|(/dev/\S+)\s+/mnt/cdrom | and $cdrom = $1; + $cdrom or cat_("/proc/mounts") =~ m,(/(?:dev|tmp)/\S+)\s+(?:/mnt/cdrom|/tmp/image), and $cdrom = $1; eval { $cdrom and ioctl detect_devices::tryOpen($1), c::CDROM_LOCKDOOR(), 0 }; } sub ejectCdrom(;$) { my ($cdrom) = @_; - $cdrom or cat_("/proc/mounts") =~ m|(/tmp/\S+)\s+/tmp/image| and $cdrom = $1; - $cdrom or cat_("/proc/mounts") =~ m|(/dev/\S+)\s+/mnt/cdrom | and $cdrom = $1; + $cdrom or cat_("/proc/mounts") =~ m,(/(?:dev|tmp)/\S+)\s+(?:/mnt/cdrom|/tmp/image), and $cdrom = $1; my $f = eval { $cdrom && detect_devices::tryOpen($cdrom) } or return; getFile("XXX"); #- close still opened filehandle eval { fs::umount("/tmp/image") }; |