Package: live-tools Version: 1:20151214+nmu1 Severity: normal Tags: patch Dear Maintainer, The live-medium-eject fails to eject the CD in my live system. I found on my live system, the _DEVICE is parsed to as something very weird: root@debian:~# bash -x /bin/live-medium-eject ... ++ awk '/\/lib\/live\/mount\/medium / { print $1 }' /proc/mounts + _DEVICE='/dev/sr0 | sed -e '\''s|/dev/||'\'' -e '\''s|[0-9].*$||'\'')' + '[' '!' -b '/dev//dev/sr0 | sed -e '\''s|/dev/||'\'' -e '\''s|[0-9].*$||'\'')' ']' + exit 0
Attached please find the patch file. It works here. My 2 cents. -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 4.6.0-1-686-pae (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Init: systemd (via /run/systemd/system) Versions of packages live-tools depends on: ii init-system-helpers 1.39 ii initramfs-tools 0.125 ii lsb-base 9.20160629 live-tools recommends no packages. Versions of packages live-tools suggests: pn debian-installer-launcher <none> ii eject 2.1.5+deb1+cvs20081104-13.1 ii perl 5.22.2-2 ii procps 2:3.3.12-2 ii rsync 3.1.1-3 ii uuid-runtime 2.28-6 -- no debconf information
Index: live-tools-20151214+nmu1/bin/live-medium-eject =================================================================== --- live-tools-20151214+nmu1.orig/bin/live-medium-eject +++ live-tools-20151214+nmu1/bin/live-medium-eject @@ -40,7 +40,7 @@ done LIVE_MEDIUM_EJECT_VERBOSE="${LIVE_MEDIUM_EJECT_VERBOSE:-true}" # Ejecting live-medium -_DEVICE="$(awk '/\/lib\/live\/mount\/medium / { print $1 }' /proc/mounts) | sed -e 's|/dev/||' -e 's|[0-9].*$||')" +_DEVICE="$(findmnt -Un -o source -T /lib/live/mount/medium | sed -e 's|^/dev/||')" if [ ! -b "/dev/${_DEVICE}" ] then