aboutsummaryrefslogtreecommitdiffstats
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
parent198ec5d6154de98b7362b8d7ab39892f202c444f (diff)
downloadinitscripts-e739f568d2777448cad09df31192784bb094077c.tar
initscripts-e739f568d2777448cad09df31192784bb094077c.tar.gz
initscripts-e739f568d2777448cad09df31192784bb094077c.tar.bz2
initscripts-e739f568d2777448cad09df31192784bb094077c.tar.xz
initscripts-e739f568d2777448cad09df31192784bb094077c.zip
fix KEYTABLE, setsysfont when serial console is present (#150769)
-rwxr-xr-xrc.d/rc.sysinit12
-rwxr-xr-xsetsysfont19
2 files changed, 15 insertions, 16 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
diff --git a/setsysfont b/setsysfont
index 9dfca891..0a612898 100755
--- a/setsysfont
+++ b/setsysfont
@@ -12,20 +12,15 @@ case "$LANG" in
exec unicode_start $SYSFONT $SYSFONTACM
fi
;;
+ *)
+ if /sbin/consoletype fg ; then
+ # no exec, unicode_stop does not set a font
+ unicode_stop
+ fi
+ ;;
esac
-if [ -x /bin/consolechars -o -x /usr/bin/consolechars ]; then
- if [ -n "$SYSFONT" ]; then
- ARGS=$SYSFONT
- if [ -n "$UNIMAP" ]; then
- ARGS="$ARGS --sfm $UNIMAP"
- fi
- if [ -n "$SYSFONTACM" ]; then
- ARGS="$ARGS --acm $SYSFONTACM"
- fi
- consolechars -f $ARGS
- fi
-elif [ -x /bin/setfont ]; then
+if [ -x /bin/setfont ]; then
if [ -n "$UNIMAP" ]; then
ARGS="-u $UNIMAP"
fi