Skip to content
Snippets Groups Projects
Commit bbec1a59 authored by Sören Tempel's avatar Sören Tempel
Browse files

main/openrc: provide patch for consolefont service

Instead of shipping an almost identical standalone file.
parent 5f429863
No related merge requests found
From 94e322563e1571bce4dda3d49b00732765282851 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Wed, 17 Aug 2016 17:52:58 +0200
Subject: [PATCH 8/8] make consolefont service compatible with busyboxs setfont
applet
Compared to kdbs setfont program it doesn't support -O and -m.
---
conf.d/consolefont | 11 ++---------
init.d/consolefont.in | 10 ----------
2 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/conf.d/consolefont b/conf.d/consolefont
index e01ae84..75544b2 100644
--- a/conf.d/consolefont
+++ b/conf.d/consolefont
@@ -3,16 +3,9 @@
#
# consolefont specifies the default font that you'd like Linux to use on the
# console. You can find a good selection of fonts in /usr/share/consolefonts;
-# you shouldn't specify the trailing ".psf.gz", just the font name below.
-# To use the default console font, comment out the CONSOLEFONT setting below.
-consolefont="default8x16"
+consolefont="default8x16.psf.gz"
# consoletranslation is the charset map file to use. Leave commented to use
# the default one. Have a look in /usr/share/consoletrans for a selection of
# map files you can use.
-#consoletranslation="8859-1_to_uni"
-
-# unicodemap is the unicode map file to use. Leave commented to use the
-# default one. Have a look in /usr/share/unimaps for a selection of map files
-# you can use.
-#unicodemap="iso01"
+#consoletranslation="8859-1_to_uni.trans"
diff --git a/init.d/consolefont.in b/init.d/consolefont.in
index 9fe95af..90fcab6 100644
--- a/init.d/consolefont.in
+++ b/init.d/consolefont.in
@@ -22,7 +22,6 @@ start()
{
ttyn=${rc_tty_number:-${RC_TTY_NUMBER:-12}}
consolefont=${consolefont:-${CONSOLEFONT}}
- unicodemap=${unicodemap:-${UNICODEMAP}}
consoletranslation=${consoletranslation:-${CONSOLETRANSLATION}}
if [ -z "$consolefont" ]; then
@@ -43,9 +42,6 @@ start()
if [ -n "$consoletranslation" ]; then
param="$param -m $consoletranslation"
fi
- if [ -n "${unicodemap}" ]; then
- param="$param -u $unicodemap"
- fi
# Set the console font
ebegin "Setting console font [$consolefont]"
@@ -60,11 +56,5 @@ start()
done
eend $retval
- # Store the font so we can use it ASAP on boot
- if [ $retval -eq 0 ] && checkpath -W "$RC_LIBEXECDIR"; then
- mkdir -p "$RC_LIBEXECDIR"/console
- setfont -O "$RC_LIBEXECDIR"/console/font
- fi
-
return $retval
}
--
2.9.3
......@@ -2,7 +2,7 @@
pkgname=openrc
pkgver=0.21.3
_ver=${pkgver/_git*/}
pkgrel=2
pkgrel=3
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git"
arch="all"
......@@ -20,6 +20,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve
0005-hide-error-when-migrating-var-run-to-run.patch
0006-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
0007-mount-efivars-read-only.patch
0008-make-consolefont-service-compatible-with-busyboxs-se.patch
openrc.logrotate
hostname.initd
......@@ -29,8 +30,6 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve
modloop.initd
networking.initd
modloop.confd
consolefont.initd
consolefont.confd
sysfsconf.initd
"
......@@ -80,6 +79,7 @@ ac16fca77d315dd92ef39db43dd2b39c 0001-call-sbin-mkmntdirs-in-localmount-OpenRC-
2ba09bebca524be06bd2ba9eeabd1be6 0005-hide-error-when-migrating-var-run-to-run.patch
f402d67b185803ea899053c3bccfc87c 0006-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
63a6b0e12a5c71d66c1dcb64bc907b6d 0007-mount-efivars-read-only.patch
2a566b361407529cbedee4a1b351268a 0008-make-consolefont-service-compatible-with-busyboxs-se.patch
d83df5513f08f09fa9e7353327701bf7 openrc.logrotate
60b4cf93ca19aff577fd743ab42878a8 hostname.initd
887eba592d487d6ffe2b42cfcd2813df hwdrivers.initd
......@@ -88,8 +88,6 @@ d83df5513f08f09fa9e7353327701bf7 openrc.logrotate
91439e5e7cbf4bb4c9860e60694da168 modloop.initd
27c22aa4e5cdba499ac9a0b6b9385f7d networking.initd
c1ec888202d868710b5749f7b217d1e3 modloop.confd
cb8760df99ddd78ba686522168854535 consolefont.initd
1c629807d282ca1dc73ffe55c29146ef consolefont.confd
8a49d8ae0ec6502d0b5ddb568e73138d sysfsconf.initd"
sha256sums="cf9a3e2056c88243ab01b817f1d4073c7f7019670e7998777632c9017886aceb openrc-0.21.3.tar.gz
9dc7b80480ea8c54fe4fd3967098906d3c535ff420879bb5d8d646e5f7f627bf 0001-call-sbin-mkmntdirs-in-localmount-OpenRC-service.patch
......@@ -99,6 +97,7 @@ d6418b65b9f2f8f31f7b87fb5a3d38baf836b4eed6544f2a6a2b980fd6cc30dd 0003-sysctl.Li
47188ade6627eeadcd9934976f131b7dea574192219be895a9802f6c24d56e09 0005-hide-error-when-migrating-var-run-to-run.patch
0447481a30d1af83293861cf53eef9b0b241d02eeb015e2d10b310acea126c9b 0006-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
cd35c4040a9b21da394c598a8996390dab1c520e93e84707014094ab82827163 0007-mount-efivars-read-only.patch
c9fefcc93af8d71e6357ba79f42f0e90585b28af6bc9f6d79365cf65995d4510 0008-make-consolefont-service-compatible-with-busyboxs-se.patch
30a81fb2f761083088d4d6a3d435fc842966d44588e9837b45ffd03e48be6eb6 openrc.logrotate
dda515d7d906cebcf4137746939f3fdccc7f504fe097ef1dbf429e3e6773a013 hostname.initd
6cb4d9ea3ad562bcf2697f61f5a76a10481d23f5dead570f82eff576eaca5236 hwdrivers.initd
......@@ -107,8 +106,6 @@ dda515d7d906cebcf4137746939f3fdccc7f504fe097ef1dbf429e3e6773a013 hostname.initd
e92994dfd5ad6b099eca7627e36dbbe1107c5862b46722c1e1e1b13d10276b60 modloop.initd
66151b5cc199485ddd188528a0f22f081994721f04c15b33df38f41a5d08ea78 networking.initd
a5a0316cd59f5401b1d789bb466c98186201277ba6f014017b14965fcc10c254 modloop.confd
15e3fd71b4f6bd3a2564c649232f4044069e41345aabde0be2c21da5999be056 consolefont.initd
9010b94892280f0bb42be39c0e989a70439eb97cbfe2a7a41a32df9a3035b8c2 consolefont.confd
63e7b8c3118612d250f55a711c3e8f0fd328ddd54464e50d0425496cc580beb4 sysfsconf.initd"
sha512sums="1c0683fa86ab9e32a1102fccfdd8f149f670f9f4bd96e0c84405f4132a400a0634d677ba43cdd2af6721b4472cfe5f5540d0af465e3dc8e8cb9c81546dc222d6 openrc-0.21.3.tar.gz
33bb89638bce6908911643d78586bd24b1a009eec0379a6e7b93ea360dda8512de3730583d177f68f81b6777d6c4ef5a70f1731ad040826f1133c9345486e5d8 0001-call-sbin-mkmntdirs-in-localmount-OpenRC-service.patch
......@@ -118,6 +115,7 @@ e68933f16a2112fdf41bf9827266dd776801656a656fb961c17bb5eaf483e4791e46594b6b47b221
c70d0bb6c8149c370231ef875d37fcfc77a3a6b0511252161abd9c5141bd14d2e12ae74f208f9b8e26057579cb732dad71ce7c1731d79273634d4d69f412565f 0005-hide-error-when-migrating-var-run-to-run.patch
769712a6ad7d401a03b15a29dbe5cb62e67e289a5ff252b470b43a265c7cd51a8bb4819d645c29eb10abdf39d9f705173d1b53d23608f638be7917a6d83a7fc7 0006-rc-pull-in-sysinit-and-boot-as-stacked-levels-when-n.patch
e1d23634e7b6d68c488efefa5a4c5b1ca59385eaab298bd3ac88903f60dd5b20d634da4c837c5a2fed012ec8b07894547984c0646aef7a3b2ab41250e778a874 0007-mount-efivars-read-only.patch
7bc9158e5a4ee085551dd15778f5af50323cea5cc8a704c76c1cd78667d4e490a41d3cc4d9778bbb5e11fbd495e8bba7c32356a8140affb983c637d064433ca1 0008-make-consolefont-service-compatible-with-busyboxs-se.patch
12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec openrc.logrotate
99b542c0903ad6874b8c308b2e0660a4fe2ff9db962dfec65325cd12c368873a2ae800d5e6d42dc4deff775e1d5c0068869eb72581f7ab16e88d5738afe1d3dd hostname.initd
b51d95df7b692aaea3e14ed009d99b46b82500d505e2eeecb6a20136cee140aea4a7377a65ccc5c51fff64be7a50666be48616d179888eaeff9d35178a7a772b hwdrivers.initd
......@@ -126,6 +124,4 @@ b04058ec630e19de0bafefe06198dc1bff8c8d5d2c89e4660dd83dda8bb82a76cdb1d8661cce88e4
c4de2292b5a175f082f4f80de5145746e4d97481fccb1d22f3a637e46c7c986ad4cd363cb1096312a4e338ce19c2bb4928d819a47e21a149fc36dba3b6dc1727 modloop.initd
9aeba2c5cae539f16185b82c6e6e84c1b044e838749b92e8994172296d86ec3f1c674d62d54db1e08a8191e513ddb0ab3509f50ccae6cb5d7ba5ff5a5b6abb46 networking.initd
aa702a7da8e6c0e5d8738febaf6b4e4cb021b30ce5c1809b530abf2b36739079446b16fc054740da8d86ed099942cf5deed6597cedb64c058f3def587a8b4689 modloop.confd
9ae0e251712f36bda9c2ebbd1bbaa5c370e9c35fd00bd41f940f1ed82bda8d36b256e03e722ca95e64b2322f65535f393bb800441529407fdfdc50d57c729aa7 consolefont.initd
260fb9500cf59ad00006086b80d463b5557c4779eb6683966a570471d302ec00325acedabf542a70f7f4bda7b5d813b51128b46d75e0c01f78223c68b3c75260 consolefont.confd
d76c75c58e6f4b0801edac4e081b725ef3d50a9a8c9bbb5692bf4d0f804af7d383bf71a73d5d03ed348a89741ef0b2427eb6a7cbf5a9b9ff60a240639fa6ec88 sysfsconf.initd"
# The consolefont service is not activated by default. If you need to
# use it, you should run "rc-update add consolefont boot" as root.
#
# consolefont specifies the default font that you'd like Linux to use on the
# console. You can find a good selection of fonts in /usr/share/consolefonts;
#consolefont="default8x16.psf.gz"
# consoletranslation is the charset map file to use. Leave commented to use
# the default one. Have a look in /usr/share/consoletrans for a selection of
# map files you can use.
#consoletranslation="8859-1_to_uni.trans"
# unicodemap is the unicode map file to use. Leave commented to use the
# default one. Have a look in /usr/share/unimaps for a selection of map files
# you can use. This will only work if you have kbd installed.
#unicodemap="iso01.uni"
#!/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
# Store the font so we can use it ASAP on boot
if [ $ret -eq 0 ] && checkpath -W "$RC_LIBEXECDIR"; then
mkdir -p "$RC_LIBEXECDIR"/console
setfont -O "$RC_LIBEXECDIR"/console/font
fi
return $ret
}
stop() {
return
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment