summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-11-18 19:07:47 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-11-18 19:07:47 +0000
commitc98ddd12f5d5f777099376ce9718c01acf55566b (patch)
tree283b87c6f5a2fb1420ae70b86746fc568d928870 /perl-install/install_any.pm
parent7c32cf9c3f2c6ad9884716f67aee1a2979812de9 (diff)
downloaddrakx-c98ddd12f5d5f777099376ce9718c01acf55566b.tar
drakx-c98ddd12f5d5f777099376ce9718c01acf55566b.tar.gz
drakx-c98ddd12f5d5f777099376ce9718c01acf55566b.tar.bz2
drakx-c98ddd12f5d5f777099376ce9718c01acf55566b.tar.xz
drakx-c98ddd12f5d5f777099376ce9718c01acf55566b.zip
no_comment
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 9086ac435..10a11c639 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -334,12 +334,15 @@ sub killCardServices {
$pid and kill(15, $pid); #- send SIGTERM
}
+sub unlockCdrom() {
+ cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/rhimage|;
+ eval { ioctl detect_devices::tryOpen($1), c::CDROM_LOCKDOOR(), 0 };
+}
sub ejectCdrom() {
cat_("/proc/mounts") =~ m|/tmp/(\S+)\s+/tmp/rhimage|;
my $f = eval { detect_devices::tryOpen($1) } or return;
getFile("XXX"); #- close still opened filehandle
eval { fs::umount("/tmp/rhimage") };
- ioctl $f, c::CDROM_LOCKDOOR(), 0; #- in case the umount fails...
ioctl $f, c::CDROMEJECT(), 1;
}