]> git.pld-linux.org Git - projects/rc-scripts.git/blobdiff - setsysfont
rc.sysinit: move /proc/cmdline parsing to single function
[projects/rc-scripts.git] / setsysfont
index c749b562577685114379d06e1f0bb2e8964b56c2..7d3a1bd7be3f231e5cfbd8c76b3b5756ef66479f 100755 (executable)
@@ -8,13 +8,20 @@
 
 [ -n "$SYSFONT" ] && CONSOLEFONT="$SYSFONT"
 
-case "$LANG" in
-  *.utf8|*.UTF-8)
-       if [ -x /bin/unicode_start ] && /sbin/consoletype fg ; then
+
+charmap=
+# /usr might not be mounted
+if [ -x /usr/bin/locale ]; then
+       charmap=$(LANG="$LANG" locale charmap)
+fi
+
+if [ "$charmap" = "UTF-8" ]; then
+       if [ -x /bin/unicode_start ] && /sbin/consoletype fg; then
                exec unicode_start $CONSOLEFONT $CONSOLEMAP
        fi
-       ;;
-esac
+elif [ -x /bin/unicode_stop ] && /sbin/consoletype fg; then
+       unicode_stop
+fi
 
 # console-tools, obsolete part
 if [ -x /usr/bin/consolechars -o -x /bin/consolechars ]; then
@@ -43,6 +50,3 @@ elif [ -x /usr/bin/setfont -o -x /bin/setfont ]; then
 fi
 
 exit 0
-
-# This must be last line !
-# vi:syntax=sh
This page took 0.044845 seconds and 4 git commands to generate.