aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox-initscripts
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-05-31 11:06:22 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-05-31 11:06:22 +0000
commit4d6d437949cc1ed7e2bd4f4fbc6033c861a9058c (patch)
tree838f38e9ef1a3fc37128f16e89b19a2c33ee3022 /main/busybox-initscripts
parent3579df3582b5e5ea53be8cd8eef240f3f0cabb10 (diff)
downloadaports-4d6d437949cc1ed7e2bd4f4fbc6033c861a9058c.tar.bz2
aports-4d6d437949cc1ed7e2bd4f4fbc6033c861a9058c.tar.xz
main/busybox-initscripts: fix cron->crond rename when upgrade
fixes #5462
Diffstat (limited to 'main/busybox-initscripts')
-rw-r--r--main/busybox-initscripts/APKBUILD6
-rw-r--r--main/busybox-initscripts/busybox-initscripts.post-install16
l---------main/busybox-initscripts/busybox-initscripts.post-upgrade1
3 files changed, 19 insertions, 4 deletions
diff --git a/main/busybox-initscripts/APKBUILD b/main/busybox-initscripts/APKBUILD
index 5ac3dffdb8..b3f9c10dc0 100644
--- a/main/busybox-initscripts/APKBUILD
+++ b/main/busybox-initscripts/APKBUILD
@@ -1,15 +1,15 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox-initscripts
-pkgver=2.3
-pkgrel=6
+pkgver=3.0
+pkgrel=0
pkgdesc="Init scripts for busybox daemons"
url="http://git.alpinelinux.org/cgit/aports/tree/core/busybox-initscripts"
arch="noarch"
license="GPL2"
depends="busybox"
makedepends=""
-install=$pkgname.post-install
+install="$pkgname.post-install $pkgname.post-upgrade"
subpackages=""
replaces="alpine-baselayout openntpd"
source="acpid.initd crond.initd dnsd.initd httpd.initd inetd.initd klogd.initd
diff --git a/main/busybox-initscripts/busybox-initscripts.post-install b/main/busybox-initscripts/busybox-initscripts.post-install
index 11575f58b9..46bdf84caa 100644
--- a/main/busybox-initscripts/busybox-initscripts.post-install
+++ b/main/busybox-initscripts/busybox-initscripts.post-install
@@ -1,9 +1,23 @@
#!/bin/sh
# this is for upgraders
-if [ -L /etc/runlevels/boot/mdev ]; then
+if [ -L /etc/runlevels/boot/mdev ] && ! [ -L /etc/runlevels/sysinit/mdev ]; then
mkdir -p /etc/runlevels/sysinit
mv /etc/runlevels/boot/mdev /etc/runlevels/sysinit/ 2>/dev/null
fi
+
+# 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
+
exit 0
diff --git a/main/busybox-initscripts/busybox-initscripts.post-upgrade b/main/busybox-initscripts/busybox-initscripts.post-upgrade
new file mode 120000
index 0000000000..ef17c50147
--- /dev/null
+++ b/main/busybox-initscripts/busybox-initscripts.post-upgrade
@@ -0,0 +1 @@
+busybox-initscripts.post-install \ No newline at end of file