summaryrefslogtreecommitdiff
path: root/configs/install-iso/overlay/usr/bin/km
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-09-06 20:45:45 -0500
committerAaron Griffin <aaronmgriffin@gmail.com>2008-09-06 20:45:45 -0500
commit98318ea039c39bff953c6b83010e48791ee6d286 (patch)
treeb817b6594cea311c3fdfe31dabbe33d80e56a5c5 /configs/install-iso/overlay/usr/bin/km
parent8966351b12bbcf2f8fffbd8c3a4b00e7529349b8 (diff)
downloadarchiso32-98318ea039c39bff953c6b83010e48791ee6d286.tar.xz
Rename "default-config" to "overlay"
I like difficulty and then name was annoying me Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'configs/install-iso/overlay/usr/bin/km')
-rwxr-xr-xconfigs/install-iso/overlay/usr/bin/km49
1 files changed, 49 insertions, 0 deletions
diff --git a/configs/install-iso/overlay/usr/bin/km b/configs/install-iso/overlay/usr/bin/km
new file mode 100755
index 0000000..c8d4817
--- /dev/null
+++ b/configs/install-iso/overlay/usr/bin/km
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+ANSWER=$(mktemp)
+BASEDIR="/usr/share/kbd"
+
+domenu()
+{
+ menutype=$1 ; shift
+ text=$1 ; shift
+ height=$1 ; shift
+ width=$1 ; shift
+ mheight=$1 ; shift
+
+ dialog --cancel-label "Skip" --$menutype "$text" $height $width $mheight $*
+}
+
+KEYMAPS=
+for i in $(find $BASEDIR/keymaps -name "*.gz" | sort); do
+ KEYMAPS="$KEYMAPS ${i##$BASEDIR/keymaps/} -"
+done
+domenu menu "Select A Keymap" 22 60 16 $KEYMAPS 2>$ANSWER
+keymap=$(cat $ANSWER)
+
+FONTS=
+# skip .cp.gz and partialfonts files for now see bug #6112, #6111
+for i in $(find $BASEDIR/consolefonts -maxdepth 1 ! -name '*.cp.gz' -name "*.gz" | sed 's|^.*/||g' | sort); do
+ FONTS="$FONTS $i -"
+done
+domenu menu "Select A Console Font" 22 60 16 $FONTS 2>$ANSWER
+font=$(cat $ANSWER)
+
+if [ "$keymap" ]; then
+ loadkeys -q $BASEDIR/keymaps/$keymap
+fi
+
+if [ "$font" ]; then
+ for i in $(seq 1 4); do
+ if [ -d /dev/vc ]; then
+ setfont $BASEDIR/consolefonts/$font -C /dev/vc/${i}
+ else
+ setfont $BASEDIR/consolefonts/$font -C /dev/tty${i}
+ fi
+ done
+fi
+
+rm -f $ANSWER
+clear
+exit 0
+