#!/bin/sh
#(c) Copyright Barry Kauler 2012, license GPL3 (usr/share/doc/legal)
#a console font gets loaded in the initrd, or failing that in rc.country.
#i was also loading it in /usr/sbin/quicksetup is locale is changed.
#however, we have problems with it getting "dropped", which seems to happen when run X.
#so, i have created this script that will call whenever we exit from X, such as
#in xwin and in xorgwizard. thanks to L18L for investigating this.

#note, en locale will have empty /etc/fontmap...
[ ! -s /etc/fontmap ] && exit

FONTMAP="`cat /etc/fontmap`"

case $FONTMAP in
 LatArCyrHeb-16.psfu)
  setfont /lib/consolefonts/${FONTMAP}.gz -C /dev/tty1
 ;;
 *) #LatGrkCyr-8x16.psfu
  zcat /lib/consolefonts/${FONTMAP}.gz | loadfont
 ;;
esac

###END###
