aboutsummaryrefslogtreecommitdiffstats
path: root/setsysfont
blob: 330e8fe7fd0eed71a4fe76751d935b785aaaf9f8 (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
#!/bin/sh

PATH=/bin:/usr/bin

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

[ -z "$SYSFONT" ] && exit 0

if [ -x /bin/setfont -o -x /usr/bin/setfont ]; then
  PARMS="$SYSFONT"
  [ -n "$UNIMAP" ] && PARMS="$PARMS -n $UNIMAP"
  [ -n "$CHARSET" ] && PARMS="$PARMS -m $CHARSET"
  setfont $PARMS
elif [ -x /bin/consolechars -o -x /usr/bin/consolechars ]; then
  ARGS="$SYSFONT"
  [ -n "$UNIMAP" ] && ARGS="$ARGS --sfm $UNIMAP"
  [ -n "$SYSFONTACM" ] && ARGS="$ARGS --acm $SYSFONTACM"
  consolechars -f $ARGS
else
  echo $"can't set font"
  exit 1
fi
exit 0