Skip to content
Snippets Groups Projects
Commit d478d5b4 authored by Natanael Copa's avatar Natanael Copa
Browse files

core/openrc: upgrade to 0.4.3

moved some of the scripts from alpine-baselayout to here
parent 887ad7d9
No related merge requests found
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openrc
pkgver=0.4.2
pkgver=0.4.3
pkgrel=0
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="http://roy.marples.name/openrc"
......@@ -8,15 +8,41 @@ license='BSD-2'
depends="uclibc"
subpackages="$pkgname-doc $pkgname-dev"
source="http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2
openrc-0.4.3-mkmntdirs.patch
openrc-gendepends-speedup.patch
hostname.initd
keymaps.initd
modules.initd
networking.initd
"
build() {
local opts
cd "$srcdir/$pkgname-$pkgver"
for i in ../*.patch; do
msg "Applying $i..."
patch -p1 < $i || return 1
done
make
make DESTDIR="$pkgdir/" install
# we cannot have anything turned on by default
rm -f "$pkgdir"/etc/runlevels/*/*
rm -f "$pkgdir"/lib/rc/net/* "$pkgdir"/etc/init.d/net.lo
# we override some of the scripts
for i in ../*.initd; do
j=${i##*/}
install -Dm755 $i "$pkgdir"/etc/init.d/${j%.initd}
done
# opts="OS=Linux"
make $opts
make $opts DESTDIR="$pkgdir/" install
}
md5sums="b56533f98e8325d9d0ba1ac7048c4d03 openrc-0.4.2.tar.bz2"
md5sums="57ca95533e629f06a0775e176e19bdb5 openrc-0.4.3.tar.bz2
8c2c1c2ee0509b63966b7187a2079f4b openrc-0.4.3-mkmntdirs.patch
dcdcb34591e3d9eaaaf82db736cc5135 openrc-gendepends-speedup.patch
c32e15b0858eef708497e7ee6355a055 hostname.initd
33ca3e558c42cdd17adccbc7807298f7 keymaps.initd
894c7f72448bfd7884314725ed83072a modules.initd
747168eee535e845179eaef5a3fcb334 networking.initd"
#!/sbin/runscript
description="Sets the hostname of the machine."
depend() {
keyword noprefix
}
start() {
if [ -f /etc/hostname ] ; then
opts="-F /etc/hostname"
else
opts="localhost"
fi
ebegin "Setting hostname"
hostname $opts
eend $?
}
#!/sbin/runscript
description="Applies a keymap for the consoles."
depend()
{
need localmount
keyword noopenvz noprefix nouml novserver noxenu
}
start() {
[ -z "$KEYMAP" ] && return
ebegin "Setting keymap"
zcat "$KEYMAP" | loadkmap
eend $?
}
stop() {
return
}
#!/sbin/runscript
description="Loads a user defined list of kernel modules."
depend()
{
keyword noopenvz noprefix novserver
}
start() {
if [ -f /etc/modules ] ; then
ebegin "Loading modules"
sed 's/\#.*//g' < /etc/modules |
while read module args
do
modprobe -q $module $args
done
eend $?
fi
}
#!/sbin/runscript
# note that the spoofprotect, syncoockies and ip_forward options are set in
# /etc/sysctl.conf
depend() {
after bootmisc
provide net
keyword nojail noprefix novserver
}
start() {
ebegin "Configuring network interfaces"
ifup -a >/dev/null 2>&1
eend $?
}
stop() {
ebegin "Deconfiguring network interfaces"
ifdown -a >/dev/null 2>&1
eend $?
}
restart() {
ebegin "Reconfiguring network interfaces"
ifdown -a >/dev/null 2>&1 && ifup -a >/dev/null 2>&1
eend $?
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment