Fix unicode font issue under systemd by ensuring proper setup order
authorMichael Prokop <mika@grml.org>
Thu, 25 Oct 2018 13:55:31 +0000 (15:55 +0200)
committerMichael Prokop <mika@grml.org>
Thu, 25 Oct 2018 13:55:31 +0000 (15:55 +0200)
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

autoconfig.functions

index ec86e84..b71e69d 100755 (executable)
@@ -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
 }
 # }}}