From: Michael Prokop Date: Thu, 25 Oct 2018 13:55:31 +0000 (+0200) Subject: Fix unicode font issue under systemd by ensuring proper setup order X-Git-Tag: v0.17.4~1 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=c820a66a697b8a4bf9d250382de10feeb38f0617 Fix unicode font issue under systemd by ensuring proper setup order We need to set up the fonts and only *then* run loadkeys, and finally invoke unicode_start. Otherwise the unicode setup is incomplete and fonts aren't displayed properly. Found hint inside https://bugs.freedesktop.org/show_bug.cgi?id=80685 + https://cgit.freedesktop.org/systemd/systemd/commit/?id=abee28c56d Thanks to Sipwise for sponsoring my development time. Closes Sipwise internal ticket TT#17028. Closes: https://github.com/grml/grml/issues/50 --- diff --git a/autoconfig.functions b/autoconfig.functions index ec86e84..b71e69d 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -318,20 +318,6 @@ config_language(){ [ -r /etc/sysconfig/keyboard ] && . /etc/sysconfig/keyboard - # activate unicode console if running within utf8 environment - if [ -r /etc/default/locale ] ; then - if grep -q "LANG=.*UTF" /etc/default/locale ; then - einfo "Setting up unicode environment." - unicode_start >>$DEBUG 2>&1 ; eend $? - fi - fi - - # Set default keyboard before interactive setup - if [ -n "$KEYTABLE" ] ; then - einfo "Running loadkeys for ${WHITE}${KEYTABLE}${NORMAL} in background" - loadkeys -q $KEYTABLE & - eend $? - fi # we have to set up all consoles, therefore loop it over all ttys: NUM_CONSOLES=$(fgconsole --next-available 2>/dev/null) @@ -387,6 +373,21 @@ config_language(){ fi fi + # Set default keyboard before interactive setup + if [ -n "$KEYTABLE" ] ; then + einfo "Running loadkeys for ${WHITE}${KEYTABLE}${NORMAL} in background" + loadkeys -q $KEYTABLE & + eend $? + fi + + # activate unicode console if running within utf8 environment + if [ -r /etc/default/locale ] ; then + if grep -q "LANG=.*UTF" /etc/default/locale ; then + einfo "Setting up unicode environment." + unicode_start ; eend $? + fi + fi + eoutdent } # }}}