Checking for ${overlay}, not ${device} when trying to close ${overlay}.
[debian-live-boot.git] / scripts / boot / 9990-initramfs-tools.sh
blob37aa0c35f1bee4ae613cf87624f059490340b072
1 #!/bin/sh
3 #set -e
5 log_wait_msg ()
7 # Print a message and wait for enter
8 if [ -x /bin/plymouth ] && plymouth --ping
9 then
10 plymouth message --text="$@"
11 plymouth watch-keystroke | read nunya
14 _log_msg "Waiting: ${@} ... \n"
17 # Override maybe_break from scripts/functions
18 maybe_break()
20 if [ "${break}" = "$1" ]; then
21 # Call original panic
22 . /scripts/functions
23 panic "Spawning shell within the initramfs"
27 # Override panic from scripts/functions
28 panic() {
30 DEB_1="\033[1;31m .''\`. \033[0m"
31 DEB_2="\033[1;31m: :' : \033[0m"
32 DEB_3="\033[1;31m\`. \`'\` \033[0m"
33 DEB_4="\033[1;31m \`- \033[0m"
35 LIVELOG="\033[1;37m/boot.log\033[0m"
36 DEBUG="\033[1;37mdebug\033[0m"
38 # Reset redirections to avoid buffering
39 exec 1>&6 6>&-
40 exec 2>&7 7>&-
41 kill ${tailpid}
43 printf "\n\n"
44 printf " ${DEB_1}\n"
45 printf " ${DEB_2} \033[1;37mBOOT FAILED!\033[0m\n"
46 printf " ${DEB_3}\n"
47 printf " ${DEB_4} This Debian Live image failed to boot.\n\n"
49 printf " Please file a bug against the 'live-boot' package or email the Debian\n"
50 printf " Live mailing list at <debian-live@lists.debian.org>, making sure to note the\n"
51 printf " exact version, name and distribution of the image you were attempting to boot.\n\n"
53 printf " The file ${LIVELOG} contains some debugging information but booting with the\n"
54 printf " ${DEBUG} command-line parameter will greatly increase its verbosity which is\n"
55 printf " extremely useful when diagnosing issues.\n\n"
57 if [ -n "${panic}" ]; then
58 printf " live-boot will now restart your system. "
59 else
60 printf " live-boot will now start a shell. "
62 printf "The error message was:\n\n "
64 # Call original panic
65 . /scripts/functions
66 panic "$@"