Re: loop-AES initrd + non-english keyboards?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jari Ruusu wrote:
> "peter k." wrote:
> > Jari could you maybe implement a feature for selecting the keyboard language
> > which is used when entering the password? Having to type "z" instead of "y"
> > and vice versa because of my qwertz-keyboard is annoying!
> 
> I assume you are using encrypted root partition and using initrd.gz built by
> build-initrd.sh
> 
> Ok, request noted. It's also ok to send in a patch.

A patch to load national keyboard layout _before_ asking root partition
passphrase is below. Patch is for loop-AES-v1.5b version.

Regards,
Jari Ruusu <jari.ruusu@pp.inet.fi>


--- build-initrd.sh.old	Wed Dec 12 20:09:35 2001
+++ build-initrd.sh	Sun Jan 13 21:47:23 2002
@@ -2,7 +2,7 @@
 #
 #  build-initrd.sh
 #
-#  Written by Jari Ruusu, December 12 2001
+#  Written by Jari Ruusu, January 13 2002
 #
 #  Copyright 2001 by Jari Ruusu.
 #  Redistribution of this file is permitted under the GNU Public License.
@@ -78,6 +78,10 @@
 # temporary loop device index used in this script, 7 == /dev/loop7
 TEMPLOOPINDEX=7
 
+# 1 = load national keyboard layout, 0 = don't load
+# You _must_ manually copy correct keyboard layout to /boot/default.kmap
+LOADNATIONALKEYB=0
+
 
 if [ $# = 1 ] ; then
     if [ ! -f $1 ] ; then
@@ -174,6 +178,12 @@
         goto fail4;
     }
 
+#if ${LOADNATIONALKEYB}
+    buf[0] = 0;
+    strCat(buf, "/lib/loadkeys /lib/default.kmap");
+    exeWait(buf);
+#endif
+
 #if ${USEMODULE}
     uname(&un);
     buf[0] = 0;
@@ -322,7 +332,10 @@
 
 z="/sbin/losetup"
 if [ ${USEMODULE} == 1 ] ; then
-    z="/sbin/insmod /sbin/losetup"
+    z="${z} /sbin/insmod"
+fi
+if [ ${LOADNATIONALKEYB} == 1 ] ; then
+    z="${z} "`which loadkeys`
 fi
 for x in ${z} ; do
     echo Copying ${SOURCEROOT}${x} to ${DESTINATIONROOT}${DESTINATIONPREFIX}

-
Linux-crypto:  cryptography in and on the Linux system
Archive:       http://mail.nl.linux.org/linux-crypto/



[Index of Archives]     [Kernel]     [Linux Crypto]     [Gnu Crypto]     [Gnu Classpath]     [Netfilter]     [Bugtraq]
  Powered by Linux