aboutsummaryrefslogtreecommitdiffstats
path: root/setsysfont
blob: afa14a810340abb7b3b84e316c6dd228e384d322 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh

PATH=/bin:/usr/bin

if [ -f /etc/sysconfig/i18n ]; then
  . /etc/sysconfig/i18n
fi

if [ -n "$LANG" ]; then
  case $LANG in
      *.utf8|*.UTF-8)
           if [ -n "$SYSFONT" ]; then
	        if [ -n "$SYSFONTACM" ]; then
      		   unicode_start $SYSFONT $SYSFONTACM
		else
		   unicode_start $SYSFONT
		fi
	   else
	        unicode_start
	   fi
	   exit $?
	   ;;
   esac
fi

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 [ -n "$SYSFONT" -a -n "$UNIMAP" ]; then
    /bin/setfont $SYSFONT -u $UNIMAP
  elif [ -n "$SYSFONT" ]; then
    /bin/setfont $SYSFONT
#  else
#    /bin/setfont
  fi
else
  echo $"can't set font"
  exit 1
fi
exit 0