Commit 4d6d4379 authored by Natanael Copa's avatar Natanael Copa

main/busybox-initscripts: fix cron->crond rename when upgrade

fixes #5462
parent 3579df35
# 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
......
#!/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
busybox-initscripts.post-install
\ No newline at end of file
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