Skip to content

Commit

Permalink
Correct eject login in initscript.
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-baumann committed Feb 8, 2009
1 parent 4292b61 commit 79f0c94
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions debian/live-initramfs.init
Expand Up @@ -134,21 +134,21 @@ do_stop ()
if [ -z ${QUICKREBOOT} ]
then
# TODO: i18n
if [ -x /usr/bin/eject ]
then
BOOT_DEVICE="$(get_boot_device)"
BOOT_DEVICE="$(get_boot_device)"

if device_is_USB_flash_drive ${BOOT_DEVICE}
if device_is_USB_flash_drive ${BOOT_DEVICE}
then
# do NOT eject USB flash drives!
# otherwise rebooting with most USB flash drives
# failes because they actually remember the
# "ejected" state even after reboot
MESSAGE="Please remove the USB flash drive"
else
# ejecting is a very good idea here
MESSAGE="Please remove the disc, close the the tray (if any)"

if [ -x /usr/bin/eject ]
then
# do NOT eject USB flash drives!
# otherwise rebooting with most USB flash drives
# failes because they actually remember the
# "ejected" state even after reboot
MESSAGE="Please remove the USB flash drive"
else
# ejecting is a very good idea here
MESSAGE="Please remove the disc, close the the tray (if any)"

eject -p -m /live/image >/dev/null 2>&1
fi

Expand Down

0 comments on commit 79f0c94

Please sign in to comment.