diff options
author | Sören Tempel <soeren+git@soeren-tempel.net> | 2018-02-22 19:50:11 +0100 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-02-28 17:52:17 +0000 |
commit | 05ece0ade3577646c1055ed573d0cbb5ff9b06f9 (patch) | |
tree | 51c4a3e7211d8d23e87a9beb2a670597e4713899 /main/busybox-initscripts | |
parent | d0273d93d561bb040de00599ce46f5523cd6fbab (diff) | |
download | aports-05ece0ade3577646c1055ed573d0cbb5ff9b06f9.tar.bz2 aports-05ece0ade3577646c1055ed573d0cbb5ff9b06f9.tar.xz |
main/openrc: move loadkmap service to busybox-initscripts
Diffstat (limited to 'main/busybox-initscripts')
-rw-r--r-- | main/busybox-initscripts/APKBUILD | 12 | ||||
-rw-r--r-- | main/busybox-initscripts/busybox-initscripts.post-install | 45 | ||||
-rw-r--r-- | main/busybox-initscripts/loadkmap.confd | 2 | ||||
-rw-r--r-- | main/busybox-initscripts/loadkmap.initd | 21 |
4 files changed, 64 insertions, 16 deletions
diff --git a/main/busybox-initscripts/APKBUILD b/main/busybox-initscripts/APKBUILD index 80434b9994..c4a8469ecf 100644 --- a/main/busybox-initscripts/APKBUILD +++ b/main/busybox-initscripts/APKBUILD @@ -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 diff --git a/main/busybox-initscripts/busybox-initscripts.post-install b/main/busybox-initscripts/busybox-initscripts.post-install index fab24cac62..424c6ddb09 100644 --- a/main/busybox-initscripts/busybox-initscripts.post-install +++ b/main/busybox-initscripts/busybox-initscripts.post-install @@ -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 diff --git a/main/busybox-initscripts/loadkmap.confd b/main/busybox-initscripts/loadkmap.confd new file mode 100644 index 0000000000..2bdbc0608c --- /dev/null +++ b/main/busybox-initscripts/loadkmap.confd @@ -0,0 +1,2 @@ +# Absolut path to the keymap which should be loaded using loadkmap. +#KEYMAP="/usr/share/keymaps/xkb/us.map.gz" diff --git a/main/busybox-initscripts/loadkmap.initd b/main/busybox-initscripts/loadkmap.initd new file mode 100644 index 0000000000..7149dd729e --- /dev/null +++ b/main/busybox-initscripts/loadkmap.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run + +description="Applies a keymap for the consoles." + +depend() +{ + provide keymaps + need localmount + keyword -openvz -prefix -uml -vserver -xenu -lxc +} + +start() { + [ -z "$KEYMAP" ] && return + ebegin "Setting keymap" + zcat "$KEYMAP" | loadkmap + eend $? +} + +stop() { + return +} |