# Exit if system was not booted by live-initramfs
grep -qs boot=live /proc/cmdline || exit 0
+# Exit if the system was booted from an ISO image rather than a physical CD
+grep -qs find_iso= /proc/cmdline && exit 0
+
# Read configuration variable file if it is present
[ -r /etc/live.conf ] && . /etc/live.conf
return 0
fi
- for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default; do
+ prompt=1
+ if grep -qs noprompt /proc/cmdline; then
+ prompt=
+ fi
+
+ for path in $(which halt) $(which reboot) /etc/rc?.d /etc/default $(which stty); do
cache_path "${path}"
done
if [ -x /usr/bin/eject ]
then
eject -p -m /live/image >/dev/null 2>&1
+
+ [ "$prompt" ] || return 0
fi
+ stty sane < /dev/console
+
# XXX - i18n
- echo "Please remove the disc and close the tray (if any) then press ENTER: "
+ echo "Please remove the disc and close the tray (if any) then press ENTER: " > /dev/console
if [ -x /sbin/usplash_write ]; then
/sbin/usplash_write "TIMEOUT 86400"
/sbin/usplash_write "TEXT-URGENT Please remove the disc, close the tray (if any)"