Accepting request 835309 from home:sbrabec:branches-kbd-prefer-xkb
- Make kbdsettings working in both bash and dash (boo#1175040). OBS-URL: https://build.opensuse.org/request/show/835309 OBS-URL: https://build.opensuse.org/package/show/Base:System/kbd?expand=0&rev=128
This commit is contained in:
parent
3b386742ca
commit
07d827eea1
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 17 22:43:16 UTC 2020 - Stanislav Brabec <sbrabec@suse.com>
|
||||||
|
|
||||||
|
- Make kbdsettings working in both bash and dash (boo#1175040).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 17 14:47:04 UTC 2020 - Stanislav Brabec <sbrabec@suse.com>
|
Thu Sep 17 14:47:04 UTC 2020 - Stanislav Brabec <sbrabec@suse.com>
|
||||||
|
|
||||||
|
11
kbdsettings
11
kbdsettings
@ -7,11 +7,12 @@
|
|||||||
|
|
||||||
for i in NUM SCR CAPS; do
|
for i in NUM SCR CAPS; do
|
||||||
conf=$(eval echo KBD_${i}LOCK)
|
conf=$(eval echo KBD_${i}LOCK)
|
||||||
[ -z ${!conf} ] && continue
|
eval confval=\"\$$conf\"
|
||||||
param=$(echo ${i,,} | sed 's/scr/scroll/')
|
[ -z "$confval" ] && continue
|
||||||
|
param=$(echo $i | tr A-Z a-z | sed 's/scr/scroll/')
|
||||||
|
|
||||||
for tty in ${KBD_TTY:-tty1 tty2 tty3 tty4 tty5 tty6}; do
|
for tty in ${KBD_TTY:-tty1 tty2 tty3 tty4 tty5 tty6}; do
|
||||||
case "${!conf}" in
|
case "$confval" in
|
||||||
yes)
|
yes)
|
||||||
if [ $param = "num" ]; then
|
if [ $param = "num" ]; then
|
||||||
touch /run/numlock-on
|
touch /run/numlock-on
|
||||||
@ -35,11 +36,11 @@ for i in NUM SCR CAPS; do
|
|||||||
/usr/bin/setleds -D -$param < /dev/$tty
|
/usr/bin/setleds -D -$param < /dev/$tty
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Value ${!conf} invalid for $conf"
|
echo "Value $confval invalid for $conf"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "error: unknown value ${!conf} in $conf"
|
echo "error: unknown value $confval in $conf"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user