Commit b34158b1 authored by Natanael Copa's avatar Natanael Copa

core/openrc: script for upgrade from old style rc[SL].d scripts

parent 78ea25f5
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openrc
pkgver=0.4.3
pkgrel=0
pkgrel=3
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="http://roy.marples.name/openrc"
license='BSD-2'
depends="uclibc"
subpackages="$pkgname-doc $pkgname-dev"
install="$pkgname.post-install"
source="http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2
openrc-0.4.3-mkmntdirs.patch
openrc-gendepends-speedup.patch
......@@ -14,6 +15,7 @@ source="http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2
keymaps.initd
modules.initd
networking.initd
$install
"
build() {
......@@ -45,4 +47,5 @@ dcdcb34591e3d9eaaaf82db736cc5135 openrc-gendepends-speedup.patch
c32e15b0858eef708497e7ee6355a055 hostname.initd
33ca3e558c42cdd17adccbc7807298f7 keymaps.initd
894c7f72448bfd7884314725ed83072a modules.initd
747168eee535e845179eaef5a3fcb334 networking.initd"
747168eee535e845179eaef5a3fcb334 networking.initd
6e834194b246563fc5acd77e91e038c4 openrc.post-install"
#!/bin/sh
if [ ! -d etc/rcS.d ] && [ ! -d etc/rcL.d ]; then
exit 0
fi
for i in etc/rc[SL].d/*; do
[ -L "$i" ] || continue
svc=${i##*/S[0-9][0-9]}
# some services are renamed
case "$svc" in
modutils) svc=modules;;
procps) svc=sysctl;;
bootmisc.sh) svc=bootmisc;;
keymap) svc=keymaps;;
esac
# add the service to correct "runlevel"
case "$svc" in
hwclock|modules|sysctl|hostname|keymaps|syslog|bootmisc)
rc-update add $svc boot;;
*) rc-update add $svc default;;
esac
rm $i
done
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