#!/bin/sh # Author: Mathieu Trudel-Lapierre # Tollef Fog Heen # Marco Amadori # PATH=/usr/sbin:/usr/bin:/sbin:/bin do_stop () { prompt=1 if grep -qs noprompt /proc/cmdline || [ -e /run/casper-no-prompt ]; then prompt= fi # XXX - i18n MSG="Please press ENTER then remove the installation medium: " MSG_FALLBACK="Please remove the installation medium, then reboot." if [ "$prompt" ]; then if [ -x /bin/plymouth ] && plymouth --ping; then chvt 63 plymouth message --text="$MSG" clear > /dev/tty1 echo $MSG_FALLBACK > /dev/tty1 else stty sane < /dev/console echo $MSG > /dev/console fi fi [ "$prompt" ] || return 0 if [ -x /bin/plymouth ] && plymouth --ping; then plymouth watch-keystroke > /dev/null else read x < /dev/console fi } do_stop