source: projects/initscripts/tags/initscripts-8.90.6/setsysfont @ 1108

Revision 1108, 841 bytes checked in by daisuke, 14 years ago (diff)

import initscripts-8.90.6 from internal cvs repository

Line 
1#!/bin/sh
2
3PATH=/bin:/usr/bin
4
5if [ -f /etc/sysconfig/i18n ]; then
6  . /etc/sysconfig/i18n
7fi
8
9case "$LANG" in
10    *.utf8|*.UTF-8)
11         if [ -x /bin/unicode_start ] && /sbin/consoletype fg ; then
12            exec unicode_start $SYSFONT $SYSFONTACM
13         fi
14         ;;
15    *)
16        if /sbin/consoletype fg ; then
17                # no exec, unicode_stop does not set a font
18                unicode_stop
19        fi
20        ;;
21esac
22
23if [ -x /bin/setfont ]; then
24  if [ -n "$UNIMAP" ]; then
25    ARGS="-u $UNIMAP"
26  fi
27  if [ -n "$SYSFONTACM" ]; then
28    if [ ! -f /lib/kbd/consoletrans/${SYSFONTACM}_to_uni.trans ]; then
29        SYSFONTACM=`echo $SYSFONTACM | sed "s|iso0|8859-|g;s|iso|8859-|g"`
30    fi
31    ARGS="$ARGS -m $SYSFONTACM"
32  fi
33  if [ -n "$SYSFONT" ]; then
34    /bin/setfont $SYSFONT $ARGS
35#  else
36#    /bin/setfont
37    echo -ne "\033(K" 2>/dev/null > /proc/$$/fd/0
38  fi
39fi
40
41exit 0
Note: See TracBrowser for help on using the repository browser.