From 3a054970e50af430d7473ccc55b1a1a25115d867 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sat, 29 Dec 2018 15:17:25 +0100 Subject: [PATCH] Set up Unicode/UTF8 and console fonts via console-setup 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 --- .../fai/config/files/etc/default/console-setup/GRMLBASE | 16 ++++++++++++++++ etc/grml/fai/config/package_config/GRMLBASE | 1 + etc/grml/fai/config/scripts/GRMLBASE/26-console-setup | 15 +++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 etc/grml/fai/config/files/etc/default/console-setup/GRMLBASE create mode 100755 etc/grml/fai/config/scripts/GRMLBASE/26-console-setup 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 index 0000000..de998f3 --- /dev/null +++ b/etc/grml/fai/config/files/etc/default/console-setup/GRMLBASE @@ -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' diff --git a/etc/grml/fai/config/package_config/GRMLBASE b/etc/grml/fai/config/package_config/GRMLBASE index fe6f1ec..d067b90 100644 --- a/etc/grml/fai/config/package_config/GRMLBASE +++ b/etc/grml/fai/config/package_config/GRMLBASE @@ -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 index 0000000..4bf7f3c --- /dev/null +++ b/etc/grml/fai/config/scripts/GRMLBASE/26-console-setup @@ -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 +# 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 -- 2.1.4