From e739f568d2777448cad09df31192784bb094077c Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 20 Nov 2006 21:00:04 +0000 Subject: fix KEYTABLE, setsysfont when serial console is present (#150769) --- rc.d/rc.sysinit | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'rc.d') diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index ddba92d0..1df46101 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -86,9 +86,9 @@ if [ "$HOSTTYPE" != "s390" -a "$HOSTTYPE" != "s390x" ]; then fi fi -if [ "$CONSOLETYPE" = "vt" -a -x /sbin/setsysfont ]; then +if [ -x /sbin/setsysfont -a -c /dev/tty1 ]; then echo -n "Setting default font ($SYSFONT): " - /sbin/setsysfont + /sbin/setsysfont < /dev/tty1 > /dev/tty1 2>/dev/null if [ $? -eq 0 ]; then success else @@ -274,7 +274,7 @@ esac action $"Setting clock $CLOCKDEF: `date`" date -if [ "$CONSOLETYPE" = "vt" -a -x /bin/loadkeys ]; then +if [ -x /bin/loadkeys ]; then KEYTABLE= KEYMAP= if [ -f /etc/sysconfig/console/default.kmap ]; then @@ -294,7 +294,11 @@ if [ "$CONSOLETYPE" = "vt" -a -x /bin/loadkeys ]; then else echo -n $"Loading default keymap: " fi - loadkeys $KEYMAP < /dev/tty0 > /dev/tty0 2>/dev/null && \ + LOADKEYS=loadkeys + if [ "${LANG}" != "${LANG%%.UTF-8}" -o "${LANG}" != "${LANG%%.utf8}" ]; then + LOADKEYS="loadkeys -u" + fi + $LOADKEYS $KEYMAP < /dev/tty0 > /dev/tty0 2>/dev/null && \ success $"Loading default keymap" || failure $"Loading default keymap" echo fi -- cgit v1.2.1