You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
livecd-rootfs/live-build/ubuntu-core-desktop/casper-stop

44 lines
1019 B

#!/bin/sh
# Author: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com>
# Tollef Fog Heen <tfheen@canonical.com>
# Marco Amadori <marco.amadori@gmail.com>
#
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