summaryrefslogtreecommitdiff
path: root/hooks/keymap
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2010-09-09 14:10:39 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2010-09-09 14:10:39 -0700
commitd000689490bbc3508f18b878757b3d2bb04d8a69 (patch)
tree40388b9f23e75fc4c0884f7fb076f2d6382e1136 /hooks/keymap
parentb9c92a3bb82e860c8368eb7933f5ec4ddcd74bcb (diff)
parent3963c563cf1ea4b1126a4c1949181029a0ff2305 (diff)
downloadinitramfs-tools-d000689490bbc3508f18b878757b3d2bb04d8a69.tar.gz
initramfs-tools-d000689490bbc3508f18b878757b3d2bb04d8a69.zip
Merge remote branch 'debian/master' into upstream
Diffstat (limited to 'hooks/keymap')
-rwxr-xr-xhooks/keymap11
1 files changed, 9 insertions, 2 deletions
diff --git a/hooks/keymap b/hooks/keymap
index a2b1b08..fa97209 100755
--- a/hooks/keymap
+++ b/hooks/keymap
@@ -21,13 +21,20 @@ if [ "$KEYMAP" != "y" ] && [ "$KEYMAP" != "Y" ]; then
fi
# Step 1 - Basic tools
-if [ ! -x /bin/loadkeys ] || [ ! -r /etc/console/boottime.kmap.gz ]; then
+if [ ! -x /bin/loadkeys ] ||
+! ( [ -r /etc/console/boottime.kmap.gz ] \
+ || [ -r /etc/console-setup/cached.kmap.gz ] ); then
exit 0
fi
. /usr/share/initramfs-tools/hook-functions
copy_exec /bin/loadkeys /bin
-cp /etc/console/boottime.kmap.gz ${DESTDIR}/etc/
+
+if [ -e /etc/console-setup/cached.kmap.gz ]; then
+ cp /etc/console-setup/cached.kmap.gz ${DESTDIR}/etc/boottime.kmap.gz
+else
+ cp /etc/console/boottime.kmap.gz ${DESTDIR}/etc/
+fi
# Step 2 - Check for UTF8 console
if [ ! -x /usr/bin/kbd_mode ]; then