summaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2006-11-20 21:00:04 +0000
committerBill Nottingham <notting@redhat.com>2006-11-20 21:00:04 +0000
commite739f568d2777448cad09df31192784bb094077c (patch)
treeb7a907fc97ff2f9d0996bc84e23e95141a8e8bef /rc.d
parent198ec5d6154de98b7362b8d7ab39892f202c444f (diff)
downloadinitscripts-e739f568d2777448cad09df31192784bb094077c.tar.gz
initscripts-e739f568d2777448cad09df31192784bb094077c.tar.xz
initscripts-e739f568d2777448cad09df31192784bb094077c.zip
fix KEYTABLE, setsysfont when serial console is present (#150769)
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/rc.sysinit12
1 files changed, 8 insertions, 4 deletions
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