diff options
-rw-r--r-- | hooks/consolefont | 6 | ||||
-rw-r--r-- | install/consolefont | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/hooks/consolefont b/hooks/consolefont index f35869e..8e53eec 100644 --- a/hooks/consolefont +++ b/hooks/consolefont @@ -6,5 +6,11 @@ run_hook () msg -n ":: Loading console font..." /usr/sbin/setfont -C /dev/console /consolefont.psfu msg "done." + elif [ -e /consolefont.psf ]; then + msg -n ":: Loading console font..." + /usr/sbin/setfont -C /dev/console /consolefont.psf + msg "done." + else + msg "No consolefont found despite added hook." fi } diff --git a/install/consolefont b/install/consolefont index 789a661..7a3e73f 100644 --- a/install/consolefont +++ b/install/consolefont @@ -8,14 +8,18 @@ install () SCRIPT="consolefont" eval "$(grep -e "^CONSOLEFONT=" /etc/rc.conf)" if [ -n "$CONSOLEFONT" ]; then - CONSOLEFONT_FILE_GZ="/usr/share/kbd/consolefonts/$CONSOLEFONT.psfu.gz" - if [ -e ${CONSOLEFONT_FILE_GZ} ]; then + if [ -e /usr/share/kbd/consolefonts/$CONSOLEFONT.psfu.gz ]; then + CONSOLEFONT_FILE_GZ="/usr/share/kbd/consolefonts/$CONSOLEFONT.psfu.gz" CONSOLEFONT_FILE="$(mktemp ${TMPDIR}/consolefont.psfu.XXXXXX)" zcat ${CONSOLEFONT_FILE_GZ} > ${CONSOLEFONT_FILE} add_file ${CONSOLEFONT_FILE} /consolefont.psfu + elif [ -e /usr/share/kbd/consolefonts/$CONSOLEFONT.psf.gz ]; then + CONSOLEFONT_FILE_GZ="/usr/share/kbd/consolefonts/$CONSOLEFONT.psf.gz" + CONSOLEFONT_FILE="$(mktemp ${TMPDIR}/consolefont.psf.XXXXXX)" + zcat ${CONSOLEFONT_FILE_GZ} > ${CONSOLEFONT_FILE} + add_file ${CONSOLEFONT_FILE} /consolefont.psf else - echo "consolefont: Font file does not exist or does not end with .psfu.gz" - echo "consolefont: Only unicode fonts are supported at the moment." + echo "consolefont: Font file does not exist or does not end with .psf.gz or .psfu.gz." fi fi } |