Commit d7759ae6 authored by Tails developers's avatar Tails developers
Browse files

Make sure the CD is ejected when pressing the eject button.

This works around the fix for [[bugs/sdmem_on_eject_broken_for_CD]]
which has to lock the CD tray for some unknown reason.
parent d2f5501e
......@@ -44,6 +44,13 @@ boot_device() {
# First clean the screen, then brutally shutdown the machine.
do_stop() {
# Really make sure that the CD is ejected
# FIXME: this might not be necessary with future kernel/udev
if [ "${DEV_TYPE}" = "cd" ]; then
eject -i off "${BOOT_DEVICE}" 2>&1 >/dev/null || true
eject -m "${BOOT_DEVICE}" 2>&1 >/dev/null || true
/etc/init.d/gdm3 stop 2>&1 >/dev/null || true
/etc/init.d/kexec-load stop 2>&1 >/dev/null || true
/etc/init.d/tails-kexec stop 2>&1 >/dev/null || true
......@@ -70,6 +77,7 @@ DEV_TYPE="${DEV_TYPE_LINE#*=}"
# If the world was sane we'd want to *disable* the eject lock, but it turns out
# that blocks the block events so udev-watchdog never receives the "change"
# event. See [[bugs/sdmem_on_eject_broken_for_CD]].
# FIXME: we might be able to do the more sane "-i off" with future kernel/udev
if [ "$DEV_TYPE" = "cd" ]; then
eject -i on "${BOOT_DEVICE}"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment