This commit is contained in:
parent
07c781c49a
commit
4344a20b78
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Oct 14 10:50:34 CEST 2008 - mmarek@suse.cz
|
||||||
|
|
||||||
|
- fix case when multiple keymaps are found (bnc#259694)
|
||||||
|
- allow to specify a path such as 'i386/es.map.gz' in KEYTABLE
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 29 16:47:35 CEST 2008 - mmarek@suse.cz
|
Mon Sep 29 16:47:35 CEST 2008 - mmarek@suse.cz
|
||||||
|
|
||||||
|
32
kbd.init
32
kbd.init
@ -1,4 +1,4 @@
|
|||||||
#! /bin/sh
|
#! /bin/bash
|
||||||
# Copyright (c) 1995-2005 SUSE LINUX Products AG, Nuernberg, Germany.
|
# Copyright (c) 1995-2005 SUSE LINUX Products AG, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# Author: Burchard Steinbild
|
# Author: Burchard Steinbild
|
||||||
@ -59,9 +59,6 @@ test "$NON_SUSE_KERNEL" = "yes" && FGCONS=`/bin/fgconsole`
|
|||||||
|
|
||||||
KBDBASE="/usr/share/kbd"
|
KBDBASE="/usr/share/kbd"
|
||||||
|
|
||||||
KTABLE=${KEYTABLE%.map*}
|
|
||||||
KTABLE=${KTABLE##*/}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# first search the wanted keytable.
|
# first search the wanted keytable.
|
||||||
#
|
#
|
||||||
@ -135,17 +132,16 @@ case "${PREVLEVEL}${RUNLEVEL}" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
KEYMAP=""
|
KEYMAP=()
|
||||||
if test -e /$KEYTABLE ; then
|
if test -e /$KEYTABLE ; then
|
||||||
KEYMAP=$KEYTABLE
|
KEYMAP=($KEYTABLE)
|
||||||
else
|
else
|
||||||
KEYTABLE=$KTABLE
|
|
||||||
case "$KEYTABLE" in
|
case "$KEYTABLE" in
|
||||||
*.gz) KBDPATH="${KEYTABLE}" ;;
|
*.gz) KBDPATH="*/${KEYTABLE}" ;;
|
||||||
*.map) KBDPATH="${KEYTABLE} ${KEYTABLE}.gz" ;;
|
*.map) KBDPATH="*/${KEYTABLE} */${KEYTABLE}.gz" ;;
|
||||||
*) KBDPATH="${KEYTABLE} ${KEYTABLE}.gz ${KEYTABLE}.map.gz ${KEYTABLE}.map" ;;
|
*) KBDPATH="*/${KEYTABLE} */${KEYTABLE}.gz */${KEYTABLE}.map.gz */${KEYTABLE}.map" ;;
|
||||||
esac
|
esac
|
||||||
KEYMAP=$(find ${KBDBASE}/keymaps -type f \( -name ${KBDPATH// / -o -name } \))
|
KEYMAP=($(find ${KBDBASE}/keymaps -type f \( -path ${KBDPATH// / -o -path } \) | sort))
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
# setup kbdrate and led status
|
# setup kbdrate and led status
|
||||||
@ -327,29 +323,28 @@ case "$1" in
|
|||||||
if test -z "$KEYTABLE"; then
|
if test -z "$KEYTABLE"; then
|
||||||
echo "No keyboard map to load"
|
echo "No keyboard map to load"
|
||||||
else
|
else
|
||||||
if test -z "$KEYMAP" || test ! -d "$KBDBASE" ; then
|
if test "${#KEYMAP[@]}" = 0 -o ! -d "$KBDBASE" ; then
|
||||||
if test -r /etc/defkeymap.map ; then
|
if test -r /etc/defkeymap.map ; then
|
||||||
if test -n "$KEYMAP" ; then
|
if test "${#KEYMAP[@]}" -gt 0; then
|
||||||
echo "$KEYMAP is unvailable, using /etc/defkeymap.map instead."
|
echo "$KEYMAP is unvailable, using /etc/defkeymap.map instead."
|
||||||
if test -r /var/run/keymap ; then
|
if test -r /var/run/keymap ; then
|
||||||
read cached < /etc/defkeymap.name
|
read cached < /etc/defkeymap.name
|
||||||
if test "$KEYMAP" != "$cached" && test $K != "$cached" ; then
|
if test "$KEYMAP" != "$cached"; then
|
||||||
echo "Warning: fallback differs: $cached"
|
echo "Warning: fallback differs: $cached"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Can not find a keymap for ${KEYTABLE}, trying fallback."
|
echo "Can not find a keymap for ${KEYTABLE}, trying fallback."
|
||||||
fi
|
fi
|
||||||
KEYMAP=/etc/defkeymap.map
|
KEYMAP=(/etc/defkeymap.map)
|
||||||
else
|
else
|
||||||
echo "Fallback /etc/defkeymap.map not there."
|
echo "Fallback /etc/defkeymap.map not there."
|
||||||
echo "Can not find a keymap for ${KEYTABLE}, Exit."
|
echo "Can not find a keymap for ${KEYTABLE}, Exit."
|
||||||
rc_failed
|
rc_failed
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if test ! -e "$KEYMAP" ; then
|
if test "${#KEYMAP[@]}" -gt 1 ; then
|
||||||
echo "Found more than one keymap ${KEYTABLE}"
|
echo "Found more than one keymap ${KEYTABLE}"
|
||||||
KEYMAP=$K
|
|
||||||
echo "Using $KEYMAP."
|
echo "Using $KEYMAP."
|
||||||
echo "If you want another one, please add complete path to"
|
echo "If you want another one, please add complete path to"
|
||||||
echo "KEYTABLE in /etc/sysconfig/keyboard."
|
echo "KEYTABLE in /etc/sysconfig/keyboard."
|
||||||
@ -470,8 +465,7 @@ case "$1" in
|
|||||||
# FIXME: this should be done much earlier
|
# FIXME: this should be done much earlier
|
||||||
# to avoid bugzilla# 259694 or similar.
|
# to avoid bugzilla# 259694 or similar.
|
||||||
mv /dev/shm/defkeymap.map /etc/defkeymap.map
|
mv /dev/shm/defkeymap.map /etc/defkeymap.map
|
||||||
if test ! -z "$KEYMAP" && test "$KEYMAP" != "/etc/defkeymap.map" ; then
|
if test "${#KEYMAP[@]}" -gt 0 -a "$KEYMAP" != "/etc/defkeymap.map" ; then
|
||||||
test ! -e "$KEYMAP" && KEYMAP=$K
|
|
||||||
echo $KEYMAP > /etc/defkeymap.name
|
echo $KEYMAP > /etc/defkeymap.name
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
5
kbd.spec
5
kbd.spec
@ -24,7 +24,7 @@ License: GPL v2 or later
|
|||||||
Group: System/Console
|
Group: System/Console
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 1.14.1
|
Version: 1.14.1
|
||||||
Release: 13
|
Release: 14
|
||||||
Summary: Keyboard and Font Utilities
|
Summary: Keyboard and Font Utilities
|
||||||
Source: kbd-%{version}.tar.bz2
|
Source: kbd-%{version}.tar.bz2
|
||||||
Source1: kbd_fonts.tar.bz2
|
Source1: kbd_fonts.tar.bz2
|
||||||
@ -302,6 +302,9 @@ install -m 644 %SOURCE12 $RPM_BUILD_ROOT/%{_mandir}/man8/
|
|||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 14 2008 mmarek@suse.cz
|
||||||
|
- fix case when multiple keymaps are found (bnc#259694)
|
||||||
|
- allow to specify a path such as 'i386/es.map.gz' in KEYTABLE
|
||||||
* Mon Sep 29 2008 mmarek@suse.cz
|
* Mon Sep 29 2008 mmarek@suse.cz
|
||||||
- fixed lat2a-16.psfu (bnc#340579)
|
- fixed lat2a-16.psfu (bnc#340579)
|
||||||
* Tue Sep 09 2008 mmarek@suse.cz
|
* Tue Sep 09 2008 mmarek@suse.cz
|
||||||
|
Loading…
Reference in New Issue
Block a user