diff options
author | maximilian attems <maks@debian.org> | 2010-06-16 18:19:08 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2010-06-17 11:26:52 +0200 |
commit | 38563fedd5e9058c9ec164031df300dd2c2d31ad (patch) | |
tree | de20f091c52504b4795d7ae43f3759c60f0b6deb | |
parent | eb93a7e7d11da7789fa357c763ce2bc76245c8a8 (diff) | |
download | initramfs-tools-38563fedd5e9058c9ec164031df300dd2c2d31ad.tar.gz initramfs-tools-38563fedd5e9058c9ec164031df300dd2c2d31ad.zip |
scripts/functions: On panic change to tty1 if chvt around
To make sure the user can read any error messages displayed. (LP: #243226)
usplash and other may cause the user to land somewhere,
where nothing is displayed.
merge from Ubuntu with adding conditional chvt invocation,
as it may not be around.
Thanks: Luke Yelavich <themuso@ubuntu.com>
Thanks: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: maximilian attems <maks@debian.org>
-rw-r--r-- | scripts/functions | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/functions b/scripts/functions index de8c1b2..ac77972 100644 --- a/scripts/functions +++ b/scripts/functions @@ -42,6 +42,11 @@ panic() if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "QUIT" fi + + if command -v chvt >/dev/null 2>&1; then + chvt 1 + fi + # Disallow console access if [ -n "${panic}" ]; then sleep ${panic} |