summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2009-06-05 17:18:20 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2009-06-05 17:18:20 +0000
commitdbe229f3aac983750c405b30c2b487bba765d747 (patch)
tree59f20c6c2791cac2ffc19e487ad644e538e4c45f
parent86509aa159bdad55ab9fe283b7f2ed40931146e7 (diff)
downloadnixpkgs-dbe229f3aac983750c405b30c2b487bba765d747.tar
nixpkgs-dbe229f3aac983750c405b30c2b487bba765d747.tar.gz
nixpkgs-dbe229f3aac983750c405b30c2b487bba765d747.tar.bz2
nixpkgs-dbe229f3aac983750c405b30c2b487bba765d747.tar.lz
nixpkgs-dbe229f3aac983750c405b30c2b487bba765d747.tar.xz
nixpkgs-dbe229f3aac983750c405b30c2b487bba765d747.tar.zst
nixpkgs-dbe229f3aac983750c405b30c2b487bba765d747.zip
* $LOCALE_ARCHIVE needs to be set, otherwise the "locale" command will
  fail and the ttys won't initialised in Unicode mode.

svn path=/nixos/branches/modular-nixos/; revision=15882
-rw-r--r--modules/tasks/kbd.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/tasks/kbd.nix b/modules/tasks/kbd.nix
index 42511a76156..08ce407fe3e 100644
--- a/modules/tasks/kbd.nix
+++ b/modules/tasks/kbd.nix
@@ -61,14 +61,15 @@ in
         pkgs.kbd
       ];
       
-      job = "
-        description \"Keyboard / console initialisation\"
+      job = ''
+        description "Keyboard / console initialisation"
 
         start on udev
 
         script
 
           export LANG=${defaultLocale}
+          export LOCALE_ARCHIVE=/var/run/current-system/sw/lib/locale/locale-archive
           export PATH=${pkgs.gzip}/bin:$PATH # Needed by setfont
 
           set +e # continue in case of errors
@@ -80,13 +81,13 @@ in
 
           charMap=$(${pkgs.glibc}/bin/locale charmap)
 
-          if test \"$charMap\" = UTF-8; then
+          if test "$charMap" = UTF-8; then
 
             for tty in ${toString ttys}; do
 
               # Tell the console output driver that the bytes arriving are
               # UTF-8 encoded multibyte sequences. 
-              echo -n -e '\\033%G' > $tty
+              echo -n -e '\033%G' > $tty
 
             done
 
@@ -99,7 +100,7 @@ in
 
               # Tell the console output driver that the bytes arriving are
               # UTF-8 encoded multibyte sequences. 
-              echo -n -e '\\033%@' > $tty
+              echo -n -e '\033%@' > $tty
 
             done
 
@@ -119,9 +120,8 @@ in
           # Set the keymap.
           ${pkgs.kbd}/bin/loadkeys '${consoleKeyMap}'
 
-
         end script
-      ";
+      '';
     
     }];
   };