]> git.pld-linux.org Git - packages/kbd.git/commitdiff
- use "locale charmap" to detect UTF-8 locales properly
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 9 Mar 2008 12:18:00 +0000 (12:18 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    kbd.init -> 1.31

kbd.init

index 905fb617a832cf2111fc73c7de9fb449cfd3ed0b..b19307fdf5f320ff9f3c799b4a3832696a5736c5 100644 (file)
--- a/kbd.init
+++ b/kbd.init
@@ -90,13 +90,11 @@ start() {
        fi
 
        if [ -n "$KEYTABLE" ]; then
-               case "$LANG" in
-               *.utf8|*.UTF-8)
+               if [ "$(LANG="$LANG" locale charmap)" = "UTF-8" ]; then
                        run_cmd "Loading keyboard table" loadkeys -u $KEYTABLE < /dev/tty0 > /dev/tty0
-                       ;;
-               *)
+               else
                        run_cmd "Loading keyboard table" loadkeys $KEYTABLE < /dev/tty0 > /dev/tty0
-               esac
+               fi
        fi
        run_cmd "Enabling SAK sequence" /bin/sh -c "echo Control Alt keycode 101 = SAK | loadkeys"
 
This page took 0.056498 seconds and 4 git commands to generate.