Set up Unicode/UTF8 and console fonts via console-setup
authorMichael Prokop <mika@grml.org>
Sat, 29 Dec 2018 14:17:25 +0000 (15:17 +0100)
committerMichael Prokop <mika@grml.org>
Sat, 29 Dec 2018 15:02:14 +0000 (16:02 +0100)
Our old approach with running loadkeys, setting console font and
invoking unicode_start via grml-autoconfig is incomplete for nowadays'
environments.

We tried to fix that by changing the order in which we set up the fonts,
runnning loadkeys and finally invoking unicode_start via grml-autoconfig
(see: grml/grml-autoconfig@c820a66). But this changed only the behavior
on tty1, the other consoles still had problems when trying to display
unicode characters (see e.g. `systemctl status` output).

The proper solution is to configure /etc/default/console-setup as needed
(doing this with this change) and rely on console-setup afterwards to do the right
thing (implemented within grml-autoconfig).

With this change we ship a default /etc/default/console-setup via
GRMLBASE, which can be customized as needed by users of grml-live
through separate FAI class files.

Explicitely added console-setup to GRMLBASE since we rely on it
nowadays.

Thanks: Michael Schierl (@schierlm) + @qlplq for feedback and Darshaka Pathirana for debugging this and providing a preliminary PR
Closes: grml/grml-autoconfig#9, grml/grml#50
Relates to: grml/grml#101

etc/grml/fai/config/files/etc/default/console-setup/GRMLBASE [new file with mode: 0644]
etc/grml/fai/config/package_config/GRMLBASE
etc/grml/fai/config/scripts/GRMLBASE/26-console-setup [new file with mode: 0755]

diff --git a/etc/grml/fai/config/files/etc/default/console-setup/GRMLBASE b/etc/grml/fai/config/files/etc/default/console-setup/GRMLBASE
new file mode 100644 (file)
index 0000000..de998f3
--- /dev/null
@@ -0,0 +1,16 @@
+# This file was deployed via grml-live's
+# ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/26-console-setup script, using
+# ${GRML_FAI_CONFIG}/config/files/etc/default/console-setup/GRMLBASE
+
+# CONFIGURATION FILE FOR SETUPCON
+# Consult the console-setup(5) manual page.
+
+ACTIVE_CONSOLES="/dev/tty{1..12}"
+CHARMAP="UTF-8"
+CODESET="Uni3"
+FONTFACE="Terminus"
+FONTSIZE="8x16"
+VIDEOMODE=
+
+# The following is an example how to use a braille font
+# FONT='lat9w-08.psf.gz brl-8x8.psf'
index fe6f1ec..d067b90 100644 (file)
@@ -3,6 +3,7 @@ PACKAGES install
 busybox
 bzip2
 console-data
+console-setup
 dbus
 deborphan
 dmidecode
diff --git a/etc/grml/fai/config/scripts/GRMLBASE/26-console-setup b/etc/grml/fai/config/scripts/GRMLBASE/26-console-setup
new file mode 100755 (executable)
index 0000000..4bf7f3c
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Filename:      ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/26-console-setup
+# Purpose:       console-setup configuration of the live system
+# Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       This file is licensed under the GPL v2 or any later version.
+################################################################################
+
+set -u
+set -e
+
+fcopy -v /etc/default/console-setup
+
+## END OF FILE #################################################################
+# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2