summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2010-06-16 18:19:08 +0200
committermaximilian attems <maks@debian.org>2010-06-17 11:26:52 +0200
commit38563fedd5e9058c9ec164031df300dd2c2d31ad (patch)
treede20f091c52504b4795d7ae43f3759c60f0b6deb /scripts/functions
parenteb93a7e7d11da7789fa357c763ce2bc76245c8a8 (diff)
downloadinitramfs-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>
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions5
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}