aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-07-23 20:49:41 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2015-07-24 11:43:04 +0000
commit5a9b44f15e450768f46e6601653ecda927e35c00 (patch)
tree9dc43d8cc79d18192ad2806178b857569fa40286 /main/openrc
parent5cd04102085f46700dfb0aa146d7876c939ee575 (diff)
downloadaports-5a9b44f15e450768f46e6601653ecda927e35c00.tar.bz2
aports-5a9b44f15e450768f46e6601653ecda927e35c00.tar.xz
main/openrc: ship saner consolefont service
Patch from Bernd Lauert fixes #4457
Diffstat (limited to 'main/openrc')
-rw-r--r--main/openrc/APKBUILD23
-rw-r--r--main/openrc/consolefont.confd16
-rw-r--r--main/openrc/consolefont.initd36
3 files changed, 70 insertions, 5 deletions
diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD
index 28412108bb..2650d93704 100644
--- a/main/openrc/APKBUILD
+++ b/main/openrc/APKBUILD
@@ -2,7 +2,7 @@
pkgname=openrc
pkgver=0.17
_ver=${pkgver/_git*/}
-pkgrel=1
+pkgrel=2
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git"
arch="all"
@@ -28,6 +28,8 @@ source="openrc-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgver.
modloop.initd
networking.initd
modloop.confd
+ consolefont.initd
+ consolefont.confd
"
_builddir="$srcdir/$pkgname-$_ver"
@@ -62,7 +64,12 @@ package() {
install -Dm755 $i "$pkgdir"/etc/init.d/${j%.initd}
done
- install -D -m644 "$srcdir"/modloop.confd "$pkgdir"/etc/conf.d/modloop
+ # we override some of the conf.d files
+ for i in "$srcdir"/*.confd; do
+ j=${i##*/}
+ install -Dm644 $i "$pkgdir"/etc/conf.d/${j%.confd}
+ done
+
install -d "$pkgdir"/etc/local.d "$pkgdir"/run
}
@@ -80,7 +87,9 @@ db45dc04a50d48a0c377e9de3ee0008b rc-pull-in-sysinit-and-boot-as-stacked-levels-
0ece77eff8f163b36f6f0e7a6d422866 modules.initd
a76e20fe5abea4449ed4e560a11334a4 modloop.initd
27c22aa4e5cdba499ac9a0b6b9385f7d networking.initd
-c1ec888202d868710b5749f7b217d1e3 modloop.confd"
+c1ec888202d868710b5749f7b217d1e3 modloop.confd
+bd51c5353d6dbbb34d929bf59097b232 consolefont.initd
+1c629807d282ca1dc73ffe55c29146ef consolefont.confd"
sha256sums="b31104689471905976c0cc871cf55a5929e903315d683f8432078b5f66cea842 openrc-0.17.tar.gz
c807aed11d7eb42de5c421a6d117532f6215697f159f40cb3404bdc80270bee1 openrc-0.4.3-mkmntdirs.patch
e869e2076c10a7134f5d9e4ae4a5d09ca35c6333d400556f1e329170d2e58066 0001-Force-root-be-rw-before-localmount.patch
@@ -95,7 +104,9 @@ e23db45e9399dab96d6c922af6c0cd6c243bbcc43756c845b70a9c7222a96313 hostname.initd
a145636e84547d76b8a188a94c0a76fcc266cd0f486be6cf24d2d74f03038118 modules.initd
61fb9e41c28f3632cc47e4ebd12fa856d0f80803aca1cd3446de3522829f308f modloop.initd
66151b5cc199485ddd188528a0f22f081994721f04c15b33df38f41a5d08ea78 networking.initd
-a5a0316cd59f5401b1d789bb466c98186201277ba6f014017b14965fcc10c254 modloop.confd"
+a5a0316cd59f5401b1d789bb466c98186201277ba6f014017b14965fcc10c254 modloop.confd
+8a3f663e9ac14f62c3aef4121736a71edd676bdc9dd93c1d411f13a0e7ab4ee6 consolefont.initd
+9010b94892280f0bb42be39c0e989a70439eb97cbfe2a7a41a32df9a3035b8c2 consolefont.confd"
sha512sums="9fa4cb4939ed40cdcdbc07e8d32a1c53a6ec17aaffcab2e6f361cbd1b8b931a78680ed853b9b1ffa0d536e4c2a0bf1690e3e59e604c7ed07780f45d3462dec9c openrc-0.17.tar.gz
eee27fbf72776fb70d3aa6c6464180731d522191e5755aa431ab09ea11dd11bf001a95618adcaa5ccc08455268003ca2917b2bff31adc9894214221c469a97db openrc-0.4.3-mkmntdirs.patch
51c77be5ab726d50ef1d0b9dab644edef1ff739e855e3a12ab27beada8911998e0c6a7491eb92df621dcdb633b672d933a4edc00115ec43bdf1271105239ebb7 0001-Force-root-be-rw-before-localmount.patch
@@ -110,4 +121,6 @@ b51d95df7b692aaea3e14ed009d99b46b82500d505e2eeecb6a20136cee140aea4a7377a65ccc5c5
7702e2704e4bcfad7c0736eec4cb0e8b20a685851afb5bd9022c5056ea78b8598a9402bae9644ae3268e2ff1c566e147cbb8d00e143491841682e4125fde2a75 modules.initd
992fbeded59679963a8d0154415c44949c7cd9719d85190ff57b3cf9db00c1daac090e1f45580cbf446e4d8fb65d21209d529e5709eb27ea2ecc31d75245f969 modloop.initd
9aeba2c5cae539f16185b82c6e6e84c1b044e838749b92e8994172296d86ec3f1c674d62d54db1e08a8191e513ddb0ab3509f50ccae6cb5d7ba5ff5a5b6abb46 networking.initd
-aa702a7da8e6c0e5d8738febaf6b4e4cb021b30ce5c1809b530abf2b36739079446b16fc054740da8d86ed099942cf5deed6597cedb64c058f3def587a8b4689 modloop.confd"
+aa702a7da8e6c0e5d8738febaf6b4e4cb021b30ce5c1809b530abf2b36739079446b16fc054740da8d86ed099942cf5deed6597cedb64c058f3def587a8b4689 modloop.confd
+c8d52d69692a00862cd55719174d7a260d5149f4951dd71196f5e9cebce3a75420a8815f0fe8b186d00b4d46739dc54542dae01a941605fcb1435f4385e444b7 consolefont.initd
+260fb9500cf59ad00006086b80d463b5557c4779eb6683966a570471d302ec00325acedabf542a70f7f4bda7b5d813b51128b46d75e0c01f78223c68b3c75260 consolefont.confd"
diff --git a/main/openrc/consolefont.confd b/main/openrc/consolefont.confd
new file mode 100644
index 0000000000..c511bf0379
--- /dev/null
+++ b/main/openrc/consolefont.confd
@@ -0,0 +1,16 @@
+# 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"
diff --git a/main/openrc/consolefont.initd b/main/openrc/consolefont.initd
new file mode 100644
index 0000000000..6f666373a3
--- /dev/null
+++ b/main/openrc/consolefont.initd
@@ -0,0 +1,36 @@
+#!/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
+}