summaryrefslogtreecommitdiff
path: root/init.d.Linux
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-09-28 12:54:48 +0000
committerRoy Marples <roy@marples.name>2007-09-28 12:54:48 +0000
commitbefddaf2418cf4a732a46aecfb79cb9cf64b3a40 (patch)
treecd86205c8c5b7796107113d2cad3090a0adb6004 /init.d.Linux
parentb894cdb7383a35d63f16c59bc31c5c619e64db0d (diff)
downloadopenrc-befddaf2418cf4a732a46aecfb79cb9cf64b3a40.tar.gz
openrc-befddaf2418cf4a732a46aecfb79cb9cf64b3a40.tar.bz2
openrc-befddaf2418cf4a732a46aecfb79cb9cf64b3a40.tar.xz
keymaps now sets unicode keyboard on all defined ttys, #192442
thanks to Pacho Ramos.
Diffstat (limited to 'init.d.Linux')
-rwxr-xr-xinit.d.Linux/keymaps18
1 files changed, 12 insertions, 6 deletions
diff --git a/init.d.Linux/keymaps b/init.d.Linux/keymaps
index 1748512..4b1217c 100755
--- a/init.d.Linux/keymaps
+++ b/init.d.Linux/keymaps
@@ -30,6 +30,10 @@ start() {
esac
local WINDOWKEYS_KEYMAP= LOADKEYS_UNI=
+ local ttydev= n=
+ [ -d /dev/vc ] \
+ && ttydev=/dev/vc/ \
+ || ttydev=/dev/tty
checkconfig || return 1
@@ -39,8 +43,12 @@ start() {
fi
# Turn on unicode if user wants it
- if [ "${UNICODE}" = "yes" ] ; then
- kbd_mode -u
+ if [ "${UNICODE}" = "yes" ]; then
+ n=1
+ while [ ${n} -le "${RC_TTY_NUMBER}" ]; do
+ kbd_mode -u -C "${ttydev}${n}"
+ n=$((${n} + 1))
+ done
LOADKEYS_UNI="--unicode"
fi
@@ -74,11 +82,9 @@ start() {
termencoding="%@"
termmsg="ASCII"
fi
- local n=1 ttydev=
- [ -d /dev/vc ] \
- && ttydev=/dev/vc/ \
- || ttydev=/dev/tty
+
ebegin "Setting terminal encoding to" ${termmsg}
+ n=1
while [ ${n} -le "${RC_TTY_NUMBER}" ] ; do
printf "\033%s" "${termencoding}" >"${ttydev}${n}"
n=$((${n} + 1))