diff -u a/functions b/functions --- a/functions 2009-09-06 10:47:22.522614161 +0200 +++ b/functions 2009-09-06 10:49:25.808701943 +0200 @@ -279,6 +279,34 @@ done } +# Function for setting console font if required +maybe_setfont() { + if [ -n "$CONSOLEFONT" ]; then + stat_busy "Loading Console Font: $CONSOLEFONT" + #CONSOLEMAP in UTF-8 shouldn't be used + if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then + CONSOLEMAP="" + fi + for i in /dev/tty[0-9]*; do + if [ -n "$CONSOLEMAP" ]; then + /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C ${i} >/dev/null 2>&1 + else + /usr/bin/setfont $CONSOLEFONT -C ${i} >/dev/null 2>&1 + fi + done + if [ $? -ne 0 ]; then + stat_fail + else + for i in /dev/tty[0-9]*; do + printf "\e(K" > ${i} + done + # the $CONSOLE check helps us avoid this when running scripts from cron + echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e(K"; fi' >>/etc/profile.d/locale.sh + stat_done + fi + fi +} + # Source additional functions at the end to allow overrides for f in /etc/rc.d/functions.d/*; do if [ -e $f ]; then diff -u a/rc.sysinit b/rc.sysinit --- a/rc.sysinit 2009-09-06 10:41:05.494970869 +0200 +++ b/rc.sysinit 2009-09-06 10:49:27.911582867 +0200 @@ -380,30 +380,8 @@ [ -n "$KEYMAP" ] && status "Loading Keyboard Map: $KEYMAP" /bin/loadkeys -q $KEYMAP fi -if [ -n "$CONSOLEFONT" ]; then - stat_busy "Loading Console Font: $CONSOLEFONT" - #CONSOLEMAP in UTF-8 shouldn't be used - if [ -n "$CONSOLEMAP" ] && echo "$LOCALE" | /bin/grep -qi utf ; then - CONSOLEMAP="" - fi - for i in /dev/tty[0-9]*; do - if [ -n "$CONSOLEMAP" ]; then - /usr/bin/setfont -m $CONSOLEMAP $CONSOLEFONT -C ${i} >/dev/null 2>&1 - else - /usr/bin/setfont $CONSOLEFONT -C ${i} >/dev/null 2>&1 - fi - done - if [ $? -ne 0 ]; then - stat_fail - else - for i in /dev/tty[0-9]*; do - printf "\e(K" > ${i} - done - # the $CONSOLE check helps us avoid this when running scripts from cron - echo 'if [ "$CONSOLE" = "" -a "$TERM" = "linux" -a -t 1 ]; then printf "\e(K"; fi' >>/etc/profile.d/locale.sh - stat_done - fi -fi +# Set console font if required +maybe_setfont # Adding persistent network/cdrom generated rules if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then