Commit b1febd98 authored by Sören Tempel's avatar Sören Tempel

setup-keymap: keymaps OpenRC service has been renamed to loadkmap

parent bccb36db
...@@ -5,8 +5,8 @@ PREFIX= ...@@ -5,8 +5,8 @@ PREFIX=
MAPDIR="$ROOT/usr/share/bkeymaps" MAPDIR="$ROOT/usr/share/bkeymaps"
if [ -f "$ROOT/etc/conf.d/keymaps" ]; then if [ -f "$ROOT/etc/conf.d/loadkmap" ]; then
. "$ROOT/etc/conf.d/keymaps" . "$ROOT/etc/conf.d/loadkmap"
variant=$(basename "KEYMAP") variant=$(basename "KEYMAP")
variant="${variant%%.*}" variant="${variant%%.*}"
fi fi
...@@ -52,15 +52,15 @@ select_layout() { ...@@ -52,15 +52,15 @@ select_layout() {
setup_mapfile() { setup_mapfile() {
local name=$(basename "$1") local name=$(basename "$1")
local conf="$ROOT/etc/conf.d/keymaps" local conf="$ROOT/etc/conf.d/loadkmap"
mkdir -p "$ROOT/etc/keymap" mkdir -p "$ROOT/etc/keymap"
mkdir -p "$ROOT/etc/conf.d/" mkdir -p "$ROOT/etc/conf.d/"
if cp "$1" "$ROOT/etc/keymap/$name" ; then if cp "$1" "$ROOT/etc/keymap/$name" ; then
[ -f "$conf" ] && sed -i '/^KEYMAP=/d' "$conf" [ -f "$conf" ] && sed -i '/^KEYMAP=/d' "$conf"
echo "KEYMAP=/etc/keymap/$name" >> "$conf" echo "KEYMAP=/etc/keymap/$name" >> "$conf"
# we actually load the keymap now # we actually load the keymap now
rc-service keymaps restart rc-service loadkmap restart
rc-update -q add keymaps boot rc-update -q add loadkmap boot
goodbye 0 goodbye 0
fi fi
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment