diff options
author | Thomas Backlund <tmb@mageia.org> | 2014-01-04 21:51:06 +0100 |
---|---|---|
committer | Thomas Backlund <tmb@mageia.org> | 2014-01-04 21:51:06 +0100 |
commit | abe6ca9f950427dfd7bb1f2068a1c95383328aea (patch) | |
tree | 2e83b4bffd3f005b307f4ea20aa80bc127562838 /files/halt.local.DVD | |
parent | 33837d0c22f64fbee343234f3eea0181c1f78933 (diff) | |
download | draklive-config-abe6ca9f950427dfd7bb1f2068a1c95383328aea.tar draklive-config-abe6ca9f950427dfd7bb1f2068a1c95383328aea.tar.gz draklive-config-abe6ca9f950427dfd7bb1f2068a1c95383328aea.tar.bz2 draklive-config-abe6ca9f950427dfd7bb1f2068a1c95383328aea.tar.xz draklive-config-abe6ca9f950427dfd7bb1f2068a1c95383328aea.zip |
add mga4-alpha1 configs
Diffstat (limited to 'files/halt.local.DVD')
-rwxr-xr-x | files/halt.local.DVD | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/files/halt.local.DVD b/files/halt.local.DVD new file mode 100755 index 0000000..6254c61 --- /dev/null +++ b/files/halt.local.DVD @@ -0,0 +1,23 @@ +#!/usr/bin/perl + +use lib qw(/usr/lib/libDrakX); +use MDK::Common; +use detect_devices; +use c; + +my ($device) = cat_("/proc/mounts") =~ m!(/dev/\S+)\s+/live/media\s+iso9660!; +$device or exit; + +# try to put halt/reboot in cache, if not called directly from them +# mount is also needed by end of /etc/init.d/halt +system("$_ --help &>/dev/null") foreach qw(halt mount reboot); + +my $f = detect_devices::tryOpen($device); +# see openCdromTray() from install::any +ioctl($f, c::CDROM_LOCKDOOR(), 0); # unlock door +ioctl($f, c::CDROMEJECT(), 0); + +print "\n\nPlease press <Enter> (or <CTRL><J>) once the medium is removed.\n"; +system("read < /dev/console"); + +ioctl($f, c::CDROMCLOSETRAY(), 0); |