summaryrefslogtreecommitdiff
path: root/source/installer/sources/initrd/etc/rc.d/rc.font
blob: feefdd1091cf2c9c2d3845f642d7782270ca35ec (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
#!/bin/sh
# Load terminus font.  This is either to resize the terminal to be close to default,
# or to simply load a better looking font for the installer.

# In case udev has not yet prepared the tty devices, create them:
create_tty() {
  if [ ! -r /dev/tty1 ]; then
    mknod /dev/tty1 c 4 1
    chown root:tty /dev/tty1
    chmod 620 /dev/tty1
  fi
  if [ ! -r /dev/tty2 ]; then
    mknod /dev/tty2 c 4 2
    chown root:tty /dev/tty2
    chmod 620 /dev/tty2
  fi
  if [ ! -r /dev/tty3 ]; then
    mknod /dev/tty3 c 4 3
    chown root:tty /dev/tty3
    chmod 620 /dev/tty3
  fi
  if [ ! -r /dev/tty4 ]; then
    mknod /dev/tty4 c 4 4
    chown root:tty /dev/tty4
    chmod 620 /dev/tty4
  fi
}

if ! grep -wq nofont /proc/cmdline ; then
# Commented out this next section because it leads to too big a font on a UEFI
# framebuffer. It's possible that it would be a correct font for other fb
# console types, but it's just safer to go with the smaller choice.
#  if [ ! "$(cat /proc/fb)" = "" ] ; then
#    if [ -r /usr/share/kbd/consolefonts/ter-120b.psf.gz ]; then
#      create_tty
#      for tty in /dev/tty{1,2,3,4} ; do
#        setfont -C $tty /usr/share/kbd/consolefonts/ter-120b.psf.gz
#      done
#    fi
#  else
    if [ -r /usr/share/kbd/consolefonts/ter-114v.psf.gz ]; then
      create_tty
      for tty in /dev/tty{1,2,3,4} ; do
        setfont -C $tty /usr/share/kbd/consolefonts/ter-114v.psf.gz
      done
    fi
#  fi
fi