aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/openrc/APKBUILD38
-rw-r--r--core/openrc/hostname.initd18
-rw-r--r--core/openrc/keymaps.initd20
-rw-r--r--core/openrc/modules.initd22
-rw-r--r--core/openrc/networking.initd28
5 files changed, 120 insertions, 6 deletions
diff --git a/core/openrc/APKBUILD b/core/openrc/APKBUILD
index ab83e4d114..6ed269be9f 100644
--- a/core/openrc/APKBUILD
+++ b/core/openrc/APKBUILD
@@ -1,6 +1,6 @@
# 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"
diff --git a/core/openrc/hostname.initd b/core/openrc/hostname.initd
new file mode 100644
index 0000000000..995e4b95d8
--- /dev/null
+++ b/core/openrc/hostname.initd
@@ -0,0 +1,18 @@
+#!/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 $?
+}
diff --git a/core/openrc/keymaps.initd b/core/openrc/keymaps.initd
new file mode 100644
index 0000000000..8ee019c69d
--- /dev/null
+++ b/core/openrc/keymaps.initd
@@ -0,0 +1,20 @@
+#!/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
+}
diff --git a/core/openrc/modules.initd b/core/openrc/modules.initd
new file mode 100644
index 0000000000..eecfb8237b
--- /dev/null
+++ b/core/openrc/modules.initd
@@ -0,0 +1,22 @@
+#!/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
+}
+
diff --git a/core/openrc/networking.initd b/core/openrc/networking.initd
new file mode 100644
index 0000000000..2269e6f04f
--- /dev/null
+++ b/core/openrc/networking.initd
@@ -0,0 +1,28 @@
+#!/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 $?
+}
+