mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-28 21:02:25 +01:00
37 lines
720 B
Plaintext
37 lines
720 B
Plaintext
#!/sbin/openrc-run
|
|
|
|
description="Applies a font for the consoles."
|
|
|
|
depend() {
|
|
need localmount
|
|
keyword -openvz -prefix -uml -vserver -xenu -lxc
|
|
}
|
|
|
|
start() {
|
|
ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
|
|
if [ -z "$consolefont" ] || [ "$ttyn" -le 0 ]; then
|
|
return
|
|
fi
|
|
|
|
local params=
|
|
[ -n "$consoletranslation" ] && params="-m $consoletranslation"
|
|
|
|
# The -m flag is only supported by kbds setfont implementation
|
|
[ -n "$unicodemap" ] && params="$params -u $unicodemap"
|
|
|
|
local ttydev=/dev/tty
|
|
[ -d /dev/vc ] && ttydev=/dev/vc/
|
|
|
|
ebegin "Setting console font"
|
|
local i=1 ret=0
|
|
while [ $i -le $ttyn ]; do
|
|
setfont "$consolefont" $params -C $ttydev$i || ret=1
|
|
i=$(( i + 1 ))
|
|
done
|
|
eend $ret
|
|
}
|
|
|
|
stop() {
|
|
return
|
|
}
|