Commit 05ece0ad authored by Sören Tempel's avatar Sören Tempel Committed by Ariadne Conill

main/openrc: move loadkmap service to busybox-initscripts

parent d0273d93
......@@ -2,22 +2,22 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox-initscripts
pkgver=3.1
pkgrel=2
pkgrel=3
pkgdesc="Init scripts for busybox daemons"
url="https://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts"
arch="noarch"
license="GPL-2.0"
depends="busybox openrc"
depends="busybox openrc>=0.24.1-r6"
makedepends=""
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages=""
options="!check"
replaces="alpine-baselayout openntpd"
source="acpid.initd crond.initd dnsd.initd httpd.initd inetd.initd klogd.initd
mdev.initd ntpd.initd rdate.initd syslog.initd udhcpd.initd
mdev.initd ntpd.initd rdate.initd syslog.initd udhcpd.initd loadkmap.initd
watchdog.initd crond.confd klogd.confd ntpd.confd rdate.confd syslog.confd
watchdog.confd mdev.conf dvbdev ide_links usbdev usbdisk_link xvd_links
default.script
watchdog.confd loadkmap.confd mdev.conf dvbdev ide_links usbdev usbdisk_link
xvd_links default.script
"
prepare() {
......@@ -63,6 +63,7 @@ c30d3936e045c01fdc9d1e9d1c0d2cd79b6dabb453400f067bc4eefa239a41c98bbe3fcd3ae53792
a95d03564712803fc58c48534f2fbbf23dd8418ffd3a6a06f840e969627892eea518b4fe17f059850665fc056cedf972c26aee52c309805987fb5c59a710bd30 rdate.initd
acfd45bda4526ab551a30faec1742ad1569aa85e0d315959c3e3a3d6a693f94c74efeb57a00b8791524651e8a61d3f7ea3e3e08a4b0291ec46309f594ee8124c syslog.initd
1d4574ec7cc6d7e9952bb50b4fcb10a910868688da03a25aede492835313c686247bde1faa17f50243d61a93bfc1d8fa54cf821d7be908581e365b0f1b6a5588 udhcpd.initd
1b61a0f1eb40f2ea14bf3ed3441996f343d70fd45858d443f21244f133dcdf1c64433c3deaef769eee4e3e698b405f25e1bbc185a25c351a88ce7d120d61cf00 loadkmap.initd
0a4f989068f00dd8599433ea1fe0713c405ed871750b918e32db2d6bccefc8b870ea2e16864d1b7c3dd57d63e04b41aa0bf9c882c1a9e8108def141d12072e90 watchdog.initd
34c6f3197064bb91619b899b28a201bd4d920b18bded3845440b2cb36dc6f16cabf447c96878349b16e46c30184cbe48bac00a01c5f7cf1be038c0b7136064c5 crond.confd
f9bf43b72142bbb4c0665c1268a3d91586ef8a057dfe64c53b6923815d2db1f669b8080a38311ad89cda0b783a8628700fc5414d834a21d8e48515760bb910f7 klogd.confd
......@@ -70,6 +71,7 @@ b0ba67585f39d83320ed6de183d7463a0e163807b9f3dc6f0baa212236056f22aeb2c5399dfdcd54
3d6c4d358e226e0c0462f2003bcf0b6787f91a53f4d6b6db5bfe7748bb0dd392d7cc454058ea8a9b649e8dd2629963a5ad1257c36af04367caeb1923f954daf7 rdate.confd
f650bafb8cc9e30743249b2baefd9d0b7f4a93cc96afc5608cc24dfb0dc9a3e4cbfe554eb5a09662339630231d4636a8e76236cb2351955e109ad542e8a5a8f3 syslog.confd
359af0a4a1841dd6557eaf3e71d39f0d7a2687bad6a8fc6ef436eccf72a40f85c6400a3b7880c7f64d8e460b6af8a0ff3dd5ffc3a4b1aa8eb0d8f7eaf99ee3e4 watchdog.confd
acbba3385fb2c416362eb9176f24146b617a2e394ee0e00b9eff89350f82468a5ab8396f4f52b0aaf03d341ac6150c73182e808fa3f29a2dc71c69271cdfb811 loadkmap.confd
4f7734f5c0ca0ad87ff945b41eabeb4d0694d08317852e76ddf90dcabfab665b1f4c6d24a315c496ac667b0aebdd032756cec093999ca1e71b9acea9390bc3ca mdev.conf
ebd82f935da2ca89097234dd8a8f47e179a423652c151123a1f3343f3e1e7bfaba2b8800380e988d4e8f4294545d3a9ab6708ae2e77c5b108b5f091bbce8f94a dvbdev
0142234d0bda86ad1e5f88f1da34669e5fda46a0fd52ce507bd49ce74d2b7c12c323e8db863bccb924e6d632b568db8b243361b217c5b2e1d92a25feb6e62dec ide_links
......
......@@ -9,18 +9,41 @@ if [ -L /etc/runlevels/boot/mdev ] && ! [ -L /etc/runlevels/sysinit/mdev ]; then
mv /etc/runlevels/boot/mdev /etc/runlevels/sysinit/ 2>/dev/null
fi
rename_service() {
oldname="$1"
newname="$2"
ret=1
for link in /run/openrc/*/${oldname} /etc/runlevels/*/${oldname}; do
newlink="${link%/*}/${newname}"
if [ -L "$link" ] && ! [ -L "$newlink" ]; then
target="$(readlink $link)"
ln -s "${target%/*}/$newname" "$newlink"
rm "$link"
ret=0
continue
fi
if [ -d "$link" ] && ! [ -d "$newlink" ]; then
mv "$link" "$newlink"
ret=0
fi
done
return $ret
}
# cron was renamed to crond
for link in /run/openrc/*/cron /etc/runlevels/*/cron; do
if [ -L "$link" ] && ! [ -L "${link}d" ]; then
target="$(readlink $link)"
ln -s "${target}d" "${link}d"
rm "$link"
continue
fi
if [ -d "$link" ] && ! [ -d "${link}d" ]; then
mv "$link" "${link}d"
fi
done
rename_service cron crond
# keymaps was renamed to loadkmap
rename_service keymaps loadkmap && cat 1>&2 <<-EOF
*
* The OpenRC keymaps service was renamed to loadkmap. You might want
* to rename your previous configuration file /etc/conf.d/keymaps to
* /etc/conf.d/loadkamp. Also make sure that /etc/init.d/keymaps was
* removed and remove it manually if it wasn't.
*
EOF
exit 0
# Absolut path to the keymap which should be loaded using loadkmap.
#KEYMAP="/usr/share/keymaps/xkb/us.map.gz"
......@@ -2,7 +2,7 @@
pkgname=openrc
pkgver=0.24.1
_ver=${pkgver/_git*/}
pkgrel=5
pkgrel=6
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="https://gitweb.gentoo.org/proj/openrc.git"
arch="all"
......@@ -25,7 +25,6 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/OpenRC/openrc/archive/$pkgve
openrc.logrotate
hostname.initd
hwdrivers.initd
loadkmap.initd
modules.initd
modloop.initd
networking.initd
......@@ -67,9 +66,11 @@ package() {
done
# we use a virtual keymaps services to allow users to set their
# keymaps either with kbd or busyboxs loadkmap applet.
rm -f "$pkgdir/etc/init.d/keymaps"
mv "$pkgdir/etc/conf.d/keymaps" "$pkgdir/etc/conf.d/loadkmap"
# keymaps either with the OpenRC loadkeys service provided by
# the kbd aport or with the loadkmap service provided by the
# busybox-initscripts aport.
rm -f "$pkgdir/etc/init.d/keymaps" \
"$pkgdir/etc/conf.d/keymaps"
install -Dm644 "$srcdir/$pkgname.logrotate" "$pkgdir/etc/logrotate.d/$pkgname"
install -d "$pkgdir"/etc/local.d "$pkgdir"/run
......@@ -87,7 +88,6 @@ dbe3f170440f0f357f31ac4d49c56a9a7ec22172df2701bf4a0afdee22aedda1f88b9fa5ffdbe19a
12bb6354e808fbf47bbab963de55ee7901738b4a912659982c57ef2777fff9a670e867fcb8ec316a76b151032c92dc89a950d7d1d835ef53f753a8f3b41d2cec openrc.logrotate
99b542c0903ad6874b8c308b2e0660a4fe2ff9db962dfec65325cd12c368873a2ae800d5e6d42dc4deff775e1d5c0068869eb72581f7ab16e88d5738afe1d3dd hostname.initd
c06eac7264f6cc6888563feeae5ca745aae538323077903de1b19102e4f16baa34c18b8c27af5dd5423e7670834e2261e9aa55f2b1ec8d8fdc2be105fe894d55 hwdrivers.initd
1b61a0f1eb40f2ea14bf3ed3441996f343d70fd45858d443f21244f133dcdf1c64433c3deaef769eee4e3e698b405f25e1bbc185a25c351a88ce7d120d61cf00 loadkmap.initd
b04058ec630e19de0bafefe06198dc1bff8c8d5d2c89e4660dd83dda8bb82a76cdb1d8661cce88e4a406aa6b4152e17efff52d3eb18ffaec0751d0b6cdbcc48a modules.initd
27c036a2c07f658f7fb1e066c59dc494674ba0d81bcb85fea9caffec28ee537eb11e863e20aa4b1c88607f12496ac66d5b092c787c86ff8b8a80e423a8d99440 modloop.initd
55df0ac13dac1f215f0c573ac07b150d31232a5204eccfc8941d5af73f91b4535a85d79b7f6514217038ecbe6bffa28cb83fd8d46fd4c596e07103deb8bc8a57 networking.initd
......
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