summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
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;
}