From 38563fedd5e9058c9ec164031df300dd2c2d31ad Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 16 Jun 2010 18:19:08 +0200 Subject: 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 Thanks: Colin Watson Signed-off-by: maximilian attems --- scripts/functions | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/functions') 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} -- cgit v1.2.3