aboutsummaryrefslogtreecommitdiffstats
path: root/core/openrc
diff options
context:
space:
mode:
Diffstat (limited to 'core/openrc')
-rw-r--r--core/openrc/APKBUILD56
-rw-r--r--core/openrc/hostname.initd18
-rw-r--r--core/openrc/hwdrivers.initd27
-rw-r--r--core/openrc/keymaps.initd20
-rw-r--r--core/openrc/modloop.initd87
-rw-r--r--core/openrc/modules.initd23
-rw-r--r--core/openrc/networking.initd28
-rw-r--r--core/openrc/openrc-0.4.3-mkmntdirs.patch11
-rw-r--r--core/openrc/openrc-hwclock.patch13
-rw-r--r--core/openrc/openrc.post-install35
-rw-r--r--core/openrc/openrc.post-upgrade9
11 files changed, 0 insertions, 327 deletions
diff --git a/core/openrc/APKBUILD b/core/openrc/APKBUILD
deleted file mode 100644
index 415f24a580..0000000000
--- a/core/openrc/APKBUILD
+++ /dev/null
@@ -1,56 +0,0 @@
-# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-pkgname=openrc
-pkgver=0.5.0
-pkgrel=6
-pkgdesc="OpenRC manages the services, startup and shutdown of a host"
-url="http://roy.marples.name/openrc"
-license='BSD-2'
-depends=""
-subpackages="$pkgname-doc $pkgname-dev"
-install="$pkgname.post-install $pkgname.post-upgrade"
-source="http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2
- openrc-0.4.3-mkmntdirs.patch
- openrc-hwclock.patch
- hostname.initd
- hwdrivers.initd
- keymaps.initd
- modules.initd
- modloop.initd
- networking.initd
- $install
- "
-
-build() {
- 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
-
-}
-
-md5sums="9ec7f8425e12abbbd0f7a962aae3fa3c openrc-0.5.0.tar.bz2
-8c2c1c2ee0509b63966b7187a2079f4b openrc-0.4.3-mkmntdirs.patch
-f462c976b04cfbb35b2335be15eee7f6 openrc-hwclock.patch
-c32e15b0858eef708497e7ee6355a055 hostname.initd
-b1e64885f301166df30be3e3cf5338ff hwdrivers.initd
-33ca3e558c42cdd17adccbc7807298f7 keymaps.initd
-098a1f16812f56fcb56eb6b6f0fa31f6 modules.initd
-c77cb4a67aa7ef40dfb12dd1ff5bf5e2 modloop.initd
-747168eee535e845179eaef5a3fcb334 networking.initd
-71d823acc9935a8ac82649a94b5bc0b9 openrc.post-install
-393ff61bc0bf2c07f9af81795554c584 openrc.post-upgrade"
diff --git a/core/openrc/hostname.initd b/core/openrc/hostname.initd
deleted file mode 100644
index 995e4b95d8..0000000000
--- a/core/openrc/hostname.initd
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/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/hwdrivers.initd b/core/openrc/hwdrivers.initd
deleted file mode 100644
index 3d0ebf12b5..0000000000
--- a/core/openrc/hwdrivers.initd
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/sbin/runscript
-
-depend() {
- need sysfs dev
- before checkfs fsck
- after modloop
- keyword novserver
-}
-
-# Load hardware drivers
-start() {
- # check for boot option "nocoldplug"
- if get_bootparam noautodetect; then
- ewarn "Autodetection of hardware disabled from boot cmdline"
- return 0
- fi
-
-
- ebegin "Loading hardware drivers"
- find /sys -name modalias | xargs sort -u \
- | xargs modprobe -a 2> /dev/null
- # we run it twice so we detect all devices
- find /sys -name modalias | xargs sort -u \
- | xargs modprobe -a 2> /dev/null
- eend 0
-}
-
diff --git a/core/openrc/keymaps.initd b/core/openrc/keymaps.initd
deleted file mode 100644
index 8ee019c69d..0000000000
--- a/core/openrc/keymaps.initd
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/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/modloop.initd b/core/openrc/modloop.initd
deleted file mode 100644
index c32e1f49f5..0000000000
--- a/core/openrc/modloop.initd
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/sbin/runscript
-
-# script that will mount image with modules
-
-depend() {
- need dev
- before checkfs fsck hwdrivers modules hwclock
- keyword novserver
-}
-
-# read kernel options
-init_KOPT() {
- eval set -- $(cat /proc/cmdline 2>/dev/null)
- while [ $# -gt 0 ]; do
- case "$1" in
- *=*) eval "KOPT_${1%%=*}='${1#*=}'" ;;
- *) eval "KOPT_$(echo $1 | sed 's: :_:g')=yes" ;;
- esac
- shift
- done
-}
-
-find_mnt() {
- local dev="$1"
- local fsfile="$2"
- awk "\$ == \"$dev\" {print \$2}\"" "$fsfile" 2>/dev/null
-}
-
-# initialies: alpine_dev, alpine_mnt, alpine_fs, alpine_mounted
-find_media() {
- init_KOPT
- alpine_mounted=
- alpine_dev=${KOPT_alpine_dev%%:*}
- alpine_fs=${KOPT_alpine_dev#*:}
- [ "$alpine_fs" = "$KOPT_alpine_dev" ] && unset alpine_fs
- # first we check if alpine_dev is mounted and use this
- alpine_mnt=$(find_mnt /dev/$alpine_dev /proc/mounts)
- if [ -z "$alpine_mnt" ]; then
- # then we check fstab
- alpine_mnt=$(find_mnt /dev/$alpine_dev /etc/fstab)
- else
- alpine_mounted=yes
- fi
- # finally we fallback to /media/<devicename>
- [ -z "$alpine_mnt" ] && alpine_mnt=/media/$alpine_dev
-}
-
-start() {
- local modloop mount_opts
- find_media
- if [ -z "$alpine_dev" ] ; then
- ebegin "Skipping mount module loopback (specify with alpine_dev)"
- eend 0
- return 0
- fi
-
- modloop=${KOPT_modloop:-$KOPT_BOOT_IMAGE.cmg}
- [ -n "$alpine_fs" ] && mount_opts="-t $alpine_fs"
-
- ebegin "Mounting loopback device for kernel modules"
- if [ -z "$alpine_mounted" ]; then
- mount $mount_opts /dev/$alpine_dev $alpine_mnt 2>/dev/null
- fi
- mkdir -p /.modloop /lib
-
- mount -o loop,ro -t cramfs $alpine_mnt/$modloop /.modloop &&\
- rm -rf /lib/modules &&\
- ln -sf /.modloop/modules /lib/
- eend $? || return 1
-
- # copy firmware if there are any
- if [ -d $alpine_mnt/firmware ]; then
- ebegin "Copying firmware from $alpine_mnt/firmware"
- cp -R -a $alpine_mnt/firmware /lib/
- eend $?
- fi
-}
-
-stop() {
- find_media
- [ -z "$alpine_dev" ] && return 0
- ebegin "Unmounting loopback device for kernel modules"
- umount -d /.modloop &&\
- umount $alpine_mnt 2>/dev/null
- eend $?
-}
-
diff --git a/core/openrc/modules.initd b/core/openrc/modules.initd
deleted file mode 100644
index ef7d1f15f1..0000000000
--- a/core/openrc/modules.initd
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/sbin/runscript
-
-description="Loads a user defined list of kernel modules."
-
-depend()
-{
- before hwclock hwdrivers
- 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
deleted file mode 100644
index 2269e6f04f..0000000000
--- a/core/openrc/networking.initd
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/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 $?
-}
-
diff --git a/core/openrc/openrc-0.4.3-mkmntdirs.patch b/core/openrc/openrc-0.4.3-mkmntdirs.patch
deleted file mode 100644
index 01512ad7c0..0000000000
--- a/core/openrc/openrc-0.4.3-mkmntdirs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -ru openrc-0.4.3.orig/init.d/localmount.in openrc-0.4.3/init.d/localmount.in
---- openrc-0.4.3.orig/init.d/localmount.in 2009-04-19 14:24:11.000000000 +0000
-+++ openrc-0.4.3/init.d/localmount.in 2009-04-19 14:25:06.000000000 +0000
-@@ -13,6 +13,7 @@
-
- start()
- {
-+ [ -x /sbin/mkmntdirs ] && mkmntdirs
- # Mount local filesystems in /etc/fstab.
- local types="noproc" x=
- for x in ${net_fs_list}; do
diff --git a/core/openrc/openrc-hwclock.patch b/core/openrc/openrc-hwclock.patch
deleted file mode 100644
index 593e9ba82f..0000000000
--- a/core/openrc/openrc-hwclock.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: hwclock.in
-===================================================================
---- a/init.d/hwclock.in (revision 1571)
-+++ b/niit.d/hwclock.in (working copy)
-@@ -118,7 +118,7 @@
-
- if ! yesno $clock_adjfile; then
- # Some implementations don't handle adjustments
-- if LC_ALL=C hwclock --help | grep -q "\-\-noadjfile"; then
-+ if LC_ALL=C hwclock --help 2>&1 | grep -q "\-\-noadjfile"; then
- utc_cmd="$utc_cmd --noadjfile"
- fi
- fi
diff --git a/core/openrc/openrc.post-install b/core/openrc/openrc.post-install
deleted file mode 100644
index 1d0201d3aa..0000000000
--- a/core/openrc/openrc.post-install
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-rc_update() {
- local svc="$1"
- local level="$2"
- mkdir -p /etc/runlevels/$level
- ln -sf /etc/init.d/$svc /etc/runlevels/$level
-}
-
-if [ ! -d etc/rcS.d ] && [ ! -d etc/rcL.d ]; then
- exit 0
-fi
-
-for i in etc/rc[SL].d/*; do
- [ -L "$i" ] || continue
- oldsvc=${i##*/S[0-9][0-9]}
- # some services are renamed
- case "$oldsvc" in
- modutils) svc=modules;;
- procps) svc=sysctl;;
- bootmisc.sh) svc=bootmisc;;
- keymap) svc=keymaps;;
- *) svc=$oldsvc;;
- esac
-
- # add the service to correct "runlevel"
- case "$svc" in
- hwclock|modules|sysctl|hostname|keymaps|syslog|bootmisc)
- rc_update $svc boot;;
- *) rc_update $svc default;;
- esac
-
- rm $i
-done
-
diff --git a/core/openrc/openrc.post-upgrade b/core/openrc/openrc.post-upgrade
deleted file mode 100644
index b09f2f240c..0000000000
--- a/core/openrc/openrc.post-upgrade
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-# in 0.5.x the state dir moved from /lib/rc/init.d to /libexec/rc/init.d
-
-[ -d /lib/rc/init.d ] || exit 0
-
-mv /lib/rc/init.d/* /libexec/rc/init.d/
-rmdir /lib/rc/init.d
-exit 0