summaryrefslogtreecommitdiffstats
path: root/install/keymap
diff options
context:
space:
mode:
authorTobias Powalowski <tpowa@archlinux.org>2006-05-08 22:46:07 +0200
committerTobias Powalowski <tpowa@archlinux.org>2006-05-08 22:46:07 +0200
commit9114900c15b343c2e5585abe34d0e259f8d86478 (patch)
tree16eac8a79633f0e07ea0d0656b4798a45257919b /install/keymap
parent7c6776156d4b9513510827feecc64bc85ff88e64 (diff)
downloadmkinitcpio-9114900c15b343c2e5585abe34d0e259f8d86478.tar.gz
mkinitcpio-9114900c15b343c2e5585abe34d0e259f8d86478.tar.xz
'added firmware and keymap hooks'
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@85 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'install/keymap')
-rw-r--r--install/keymap43
1 files changed, 43 insertions, 0 deletions
diff --git a/install/keymap b/install/keymap
new file mode 100644
index 0000000..03c5a98
--- /dev/null
+++ b/install/keymap
@@ -0,0 +1,43 @@
+# vim: set ft=sh:
+
+install ()
+{
+ MODULES=""
+ BINARIES=""
+ FILES=""
+ SCRIPT="keymap"
+ KEYMAP_FILE="$(mktemp /tmp/keymap.XXXXXX)"
+ add_file /bin/loadkeys /bin/loadkeys
+ add_file /usr/bin/dumpkeys.static /bin/dumpkeys
+ add_file /usr/bin/kbd_mode.static /bin/kdb_mode
+ add_file /usr/bin/setfont.static /bin/setfont
+ grep "KEYMAP=" /etc/rc.conf >> ${KEYMAP_FILE}
+ grep "CONSOLEFONT=" /etc/rc.conf >> ${KEYMAP_FILE}
+ grep "CONSOLEMAP=" /etc/rc.conf >> ${KEYMAP_FILE}
+ if [ "`echo $LOCALE | /bin/grep -i utf`" ]; then
+ echo UTF8="yes" >> ${KEYMAP_FILE}
+ fi
+ . ${KEYMAP_FILE}
+ add_file ${KEYMAP_FILE} /keymap
+ [ "$CONSOLEFONT" != "" ] && add_file /usr/share/kbd/consolefonts/$(grep "CONSOLEFONT=" /etc/rc.conf | awk -FCONSOLEFONT= '{print $2}')*
+ [ "$CONSOLEMAP" != "" ] && add_file /usr/share/kbd/unimaps/$(grep "CONSOLEMAP=" /etc/rc.conf | awk -FCONSOLEMAP= '{print $2}')*
+ if [ "$KEYMAP" != "" ]; then
+ for i in $(find /usr/share/kbd/ -name "$(grep "KEYMAP=" /etc/rc.conf | awk -FKEYMAP= '{print $2}' | awk -F- '{print $1}')*.map.gz")
+ do add_file $i
+ done
+ for i in $(echo /usr/share/kbd/keymaps/include/*); do
+ add_file $i
+ done
+ for i in $(echo /usr/share/kbd/keymaps/*/include/*); do
+ add_file $i
+ done
+ fi
+}
+
+help ()
+{
+cat<<HELPEOF
+ This hook loads the specified keymap and consolefont from rc.conf,
+ during early userspace.
+HELPEOF
+}