* $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
This commit is contained in:
Eelco Dolstra 2009-06-05 17:18:20 +00:00
parent 86509aa159
commit dbe229f3aa
1 changed files with 7 additions and 7 deletions

View File

@ -61,14 +61,15 @@ in
pkgs.kbd pkgs.kbd
]; ];
job = " job = ''
description \"Keyboard / console initialisation\" description "Keyboard / console initialisation"
start on udev start on udev
script script
export LANG=${defaultLocale} export LANG=${defaultLocale}
export LOCALE_ARCHIVE=/var/run/current-system/sw/lib/locale/locale-archive
export PATH=${pkgs.gzip}/bin:$PATH # Needed by setfont export PATH=${pkgs.gzip}/bin:$PATH # Needed by setfont
set +e # continue in case of errors set +e # continue in case of errors
@ -80,13 +81,13 @@ in
charMap=$(${pkgs.glibc}/bin/locale charmap) charMap=$(${pkgs.glibc}/bin/locale charmap)
if test \"$charMap\" = UTF-8; then if test "$charMap" = UTF-8; then
for tty in ${toString ttys}; do for tty in ${toString ttys}; do
# Tell the console output driver that the bytes arriving are # Tell the console output driver that the bytes arriving are
# UTF-8 encoded multibyte sequences. # UTF-8 encoded multibyte sequences.
echo -n -e '\\033%G' > $tty echo -n -e '\033%G' > $tty
done done
@ -99,7 +100,7 @@ in
# Tell the console output driver that the bytes arriving are # Tell the console output driver that the bytes arriving are
# UTF-8 encoded multibyte sequences. # UTF-8 encoded multibyte sequences.
echo -n -e '\\033%@' > $tty echo -n -e '\033%@' > $tty
done done
@ -119,9 +120,8 @@ in
# Set the keymap. # Set the keymap.
${pkgs.kbd}/bin/loadkeys '${consoleKeyMap}' ${pkgs.kbd}/bin/loadkeys '${consoleKeyMap}'
end script end script
"; '';
}]; }];
}; };