summaryrefslogtreecommitdiff
path: root/pcr/openrc-misc
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/openrc-misc')
-rw-r--r--pcr/openrc-misc/10-openrc-status-r435
-rw-r--r--pcr/openrc-misc/PKGBUILD508
-rw-r--r--pcr/openrc-misc/bitlbee.confd2
-rw-r--r--pcr/openrc-misc/bitlbee.initd28
-rw-r--r--pcr/openrc-misc/bitlbee.install16
-rw-r--r--pcr/openrc-misc/clamav.install16
-rw-r--r--pcr/openrc-misc/clamd.conf-r17
-rw-r--r--pcr/openrc-misc/clamd.initd-r6129
-rw-r--r--pcr/openrc-misc/conf.d-r236
-rw-r--r--pcr/openrc-misc/conf.d.NetworkManager4
-rw-r--r--pcr/openrc-misc/connman.confd15
-rw-r--r--pcr/openrc-misc/connman.initd223
-rw-r--r--pcr/openrc-misc/connman.install16
-rw-r--r--pcr/openrc-misc/cpupower.install16
-rw-r--r--pcr/openrc-misc/cups.install16
-rw-r--r--pcr/openrc-misc/cupsd.init.d-r126
-rw-r--r--pcr/openrc-misc/fancontrol-init.d-223
-rw-r--r--pcr/openrc-misc/fcron.init.358
-rw-r--r--pcr/openrc-misc/fcron.install16
-rw-r--r--pcr/openrc-misc/fuse.init35
-rw-r--r--pcr/openrc-misc/fuse.install16
-rw-r--r--pcr/openrc-misc/haveged-conf.d10
-rw-r--r--pcr/openrc-misc/haveged-init.d.317
-rw-r--r--pcr/openrc-misc/haveged.install16
-rw-r--r--pcr/openrc-misc/hdparm-conf.d.326
-rw-r--r--pcr/openrc-misc/hdparm-init-861
-rw-r--r--pcr/openrc-misc/hdparm.install16
-rw-r--r--pcr/openrc-misc/init.d-r442
-rw-r--r--pcr/openrc-misc/init.d.NetworkManager57
-rw-r--r--pcr/openrc-misc/irexec-confd9
-rw-r--r--pcr/openrc-misc/irexec-initd-0.8.6-r228
-rw-r--r--pcr/openrc-misc/lirc-utils.install16
-rw-r--r--pcr/openrc-misc/lircd-0.8.6-r252
-rw-r--r--pcr/openrc-misc/lircd.conf.422
-rw-r--r--pcr/openrc-misc/lircmd20
-rw-r--r--pcr/openrc-misc/lm_sensors-3-init.d105
-rw-r--r--pcr/openrc-misc/lm_sensors.install28
-rw-r--r--pcr/openrc-misc/master-confd-15
-rw-r--r--pcr/openrc-misc/master-initd-314
-rw-r--r--pcr/openrc-misc/metalog.confd19
-rw-r--r--pcr/openrc-misc/metalog.initd42
-rw-r--r--pcr/openrc-misc/metalog.install15
-rw-r--r--pcr/openrc-misc/minion-confd-15
-rw-r--r--pcr/openrc-misc/minion-initd-315
-rw-r--r--pcr/openrc-misc/mpd.install16
-rw-r--r--pcr/openrc-misc/mpd2.init37
-rw-r--r--pcr/openrc-misc/networkmanager.install18
-rw-r--r--pcr/openrc-misc/ntp-client.confd21
-rw-r--r--pcr/openrc-misc/ntp-client.rc32
-rw-r--r--pcr/openrc-misc/ntp.install16
-rw-r--r--pcr/openrc-misc/ntpd.confd6
-rw-r--r--pcr/openrc-misc/ntpd.rc-r123
-rw-r--r--pcr/openrc-misc/rsyslog.confd30
-rw-r--r--pcr/openrc-misc/rsyslog.initd69
-rw-r--r--pcr/openrc-misc/rsyslog.install16
-rw-r--r--pcr/openrc-misc/salt.install24
-rw-r--r--pcr/openrc-misc/sane.install16
-rw-r--r--pcr/openrc-misc/saned.confd2
-rw-r--r--pcr/openrc-misc/saned.initd12
-rw-r--r--pcr/openrc-misc/sensord-4-init.d22
-rw-r--r--pcr/openrc-misc/sntp.confd4
-rw-r--r--pcr/openrc-misc/sntp.rc27
-rw-r--r--pcr/openrc-misc/syndic-confd-15
-rw-r--r--pcr/openrc-misc/syndic-initd-314
-rw-r--r--pcr/openrc-misc/syslog-ng.confd42
-rw-r--r--pcr/openrc-misc/syslog-ng.install15
-rw-r--r--pcr/openrc-misc/syslog-ng.rc659
-rw-r--r--pcr/openrc-misc/thermald.initd7
-rw-r--r--pcr/openrc-misc/thermald.install16
-rw-r--r--pcr/openrc-misc/virtualbox-guest-additions.install16
-rw-r--r--pcr/openrc-misc/xe-daemon.initd28
-rw-r--r--pcr/openrc-misc/xe-guest-utilities.install16
-rw-r--r--pcr/openrc-misc/zfs.initd124
-rw-r--r--pcr/openrc-misc/zfs.install16
74 files changed, 2430 insertions, 0 deletions
diff --git a/pcr/openrc-misc/10-openrc-status-r4 b/pcr/openrc-misc/10-openrc-status-r4
new file mode 100644
index 000000000..e195ccc19
--- /dev/null
+++ b/pcr/openrc-misc/10-openrc-status-r4
@@ -0,0 +1,35 @@
+#!/bin/sh
+# Copyright (c) 2012 Alexandre Rostovtsev
+# Released under the 2-clause BSD license.
+
+# Ensures that the NetworkManager OpenRC service is marked as started and
+# providing net only when it has a successful connection.
+
+if [ ! -e "/run/openrc/softlevel" ]; then
+ # OpenRC is not running
+ exit 0
+fi
+
+# Ensure rc-service is in PATH
+PATH="${PATH}:@EPREFIX@/sbin:@EPREFIX@/usr/sbin"
+
+# Exit if the NetworkManager OpenRC service is not running
+rc-service NetworkManager status 2>&1 | grep -Eq "status: (starting|started|inactive|stopping)" || exit 0
+
+# Call rc-service in background mode so that the start/stop functions update
+# NetworkManager service status to started or inactive instead of actually
+# starting or stopping the daemon
+export IN_BACKGROUND=YES
+
+case "$2" in
+ up) nm-online -t 0 -x &&
+ ! rc-service NetworkManager status 2>&1 | grep -q started &&
+ exec rc-service NetworkManager start ;;
+ down) nm-online -t 0 -x ||
+ rc-service NetworkManager status 2>&1 | grep -q stopped ||
+ exec rc-service NetworkManager stop ;;
+ pre-sleep) rc-service NetworkManager status 2>&1 | grep -q stopped ||
+ exec rc-service NetworkManager stop ;;
+esac
+exit 0
+# vim: set ts=4:
diff --git a/pcr/openrc-misc/PKGBUILD b/pcr/openrc-misc/PKGBUILD
new file mode 100644
index 000000000..31852130b
--- /dev/null
+++ b/pcr/openrc-misc/PKGBUILD
@@ -0,0 +1,508 @@
+# Maintainer: artoo <artoo@manjaro.org>
+
+# file vars for easy update
+_Ifrcon=fcron.init.3
+_Crsysl=rsyslog.confd
+_Irsysl=rsyslog.initd
+_Csane=saned.confd
+_Isane=saned.initd
+_Ifuse=fuse.init
+_Cmeta=metalog.confd
+_Imeta=metalog.initd
+_Csyslog=syslog-ng.confd
+_Isyslog=syslog-ng.rc6
+_Clirc1=lircd.conf.4
+_Clirc2=irexec-confd
+_Ilirc1=lircd-0.8.6-r2
+_Ilirc2=irexec-initd-0.8.6-r2
+_Ilirc3=lircmd
+#_Csens=sensord-conf.d
+_Isens1=sensord-4-init.d
+_Isens2=fancontrol-init.d-2
+_Isens3=lm_sensors-3-init.d
+_Ccpu=conf.d-r2
+_Icpu=init.d-r4
+_Cntp1=ntpd.confd
+_Cntp2=ntp-client.confd
+_Cntp3=sntp.confd
+_Intp1=ntpd.rc-r1
+_Intp2=ntp-client.rc
+_Intp3=sntp.rc
+_Icups=cupsd.init.d-r1
+_Ccon=connman.confd
+_Icon=connman.initd2
+_Chaveg=haveged-conf.d
+_Ihaveg=haveged-init.d.3
+_Csalt_mtr=master-confd-1
+_Isalt_mtr=master-initd-3
+_Csalt_min=minion-confd-1
+_Isalt_min=minion-initd-3
+_Csalt_sync=syndic-confd-1
+_Isalt_sync=syndic-initd-3
+_Impd=mpd2.init
+_Chdparm=hdparm-conf.d.3
+_Ihdparm=hdparm-init-8
+_Cbit=bitlbee.confd
+_Ibit=bitlbee.initd
+_Itherm=thermald.initd
+_Ixe=xe-daemon.initd
+_Izfs=zfs.initd
+_IClam=clamd.initd-r6
+_CClam=clamd.conf-r1
+_CNM=conf.d.NetworkManager
+_INM=init.d.NetworkManager
+_SNM=10-openrc-status-r4
+
+_gentoo_uri="http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86"
+
+pkgbase=openrc-misc
+pkgname=('cpupower-openrc'
+ 'connman-openrc'
+ 'fcron-openrc'
+ 'fuse-openrc'
+ 'metalog-openrc'
+ 'rsyslog-openrc'
+ 'sane-openrc'
+ 'syslog-ng-openrc'
+ 'lirc-utils-openrc'
+ 'lm_sensors-openrc'
+ 'ntp-openrc'
+ 'cups-openrc'
+ 'haveged-openrc'
+ 'salt-openrc'
+ 'mpd-openrc'
+ 'hdparm-openrc'
+ 'bitlbee-openrc'
+ 'thermald-openrc'
+ 'xe-guest-utilities-openrc'
+ 'zfs-openrc'
+ 'clamav-openrc'
+ 'networkmanager-openrc')
+pkgver=20150330
+pkgrel=1
+pkgdesc="OpenRC init scripts"
+arch=('any')
+url="https://github.com/manjaro/packages-openrc"
+license=('GPL2')
+groups=('openrc' 'openrc-misc')
+conflicts=('openrc'
+ 'openrc-git'
+ 'openrc-arch-services-git'
+ 'initscripts'
+ 'systemd-sysvcompat')
+source=("${_gentoo_uri}/sys-process/fcron/files/${_Ifrcon}"
+ "${_gentoo_uri}/app-admin/rsyslog/files/8-stable/${_Crsysl}"
+ "${_gentoo_uri}/app-admin/rsyslog/files/8-stable/${_Irsysl}"
+ "${_gentoo_uri}/media-gfx/sane-backends/files/${_Csane}"
+ "${_gentoo_uri}/media-gfx/sane-backends/files/${_Isane}"
+ "${_gentoo_uri}/sys-fs/fuse/files/${_Ifuse}"
+ "${_gentoo_uri}/app-admin/metalog/files/${_Cmeta}"
+ "${_gentoo_uri}/app-admin/metalog/files/${_Imeta}"
+ "${_gentoo_uri}/app-admin/syslog-ng/files/3.6/${_Csyslog}"
+ "${_gentoo_uri}/app-admin/syslog-ng/files/3.6/${_Isyslog}"
+ "${_gentoo_uri}/app-misc/lirc/files/${_Clirc1}"
+ "${_gentoo_uri}/app-misc/lirc/files/${_Clirc2}"
+ "${_gentoo_uri}/app-misc/lirc/files/${_Ilirc1}"
+ "${_gentoo_uri}/app-misc/lirc/files/${_Ilirc2}"
+ "${_gentoo_uri}/app-misc/lirc/files/${_Ilirc3}"
+ "${_gentoo_uri}/sys-power/cpupower/files/${_Ccpu}"
+ "${_gentoo_uri}/sys-power/cpupower/files/${_Icpu}"
+ #"${_gentoo_uri}/sys-apps/lm_sensors/files/${_Csens}"
+ "${_gentoo_uri}/sys-apps/lm_sensors/files/${_Isens1}"
+ "${_gentoo_uri}/sys-apps/lm_sensors/files/${_Isens2}"
+ "${_gentoo_uri}/sys-apps/lm_sensors/files/${_Isens3}"
+ "${_gentoo_uri}/net-misc/ntp/files/${_Cntp1}"
+ "${_gentoo_uri}/net-misc/ntp/files/${_Cntp2}"
+ "${_gentoo_uri}/net-misc/ntp/files/${_Cntp3}"
+ "${_gentoo_uri}/net-misc/ntp/files/${_Intp1}"
+ "${_gentoo_uri}/net-misc/ntp/files/${_Intp2}"
+ "${_gentoo_uri}/net-misc/ntp/files/${_Intp3}"
+ "${_gentoo_uri}/net-print/cups/files/${_Icups}"
+ "${_gentoo_uri}/net-misc/connman/files/${_Ccon}"
+ "${_gentoo_uri}/net-misc/connman/files/${_Icon}"
+ "${_gentoo_uri}/sys-apps/haveged/files/${_Chaveg}"
+ "${_gentoo_uri}/sys-apps/haveged/files/${_Ihaveg}"
+ "${_gentoo_uri}/app-admin/salt/files/${_Csalt_mtr}"
+ "${_gentoo_uri}/app-admin/salt/files/${_Isalt_mtr}"
+ "${_gentoo_uri}/app-admin/salt/files/${_Csalt_min}"
+ "${_gentoo_uri}/app-admin/salt/files/${_Isalt_min}"
+ "${_gentoo_uri}/app-admin/salt/files/${_Csalt_sync}"
+ "${_gentoo_uri}/app-admin/salt/files/${_Isalt_sync}"
+ "${_gentoo_uri}/media-sound/mpd/files/${_Impd}"
+ "${_gentoo_uri}/sys-apps/hdparm/files/${_Chdparm}"
+ "${_gentoo_uri}/sys-apps/hdparm/files/${_Ihdparm}"
+ "${_gentoo_uri}/net-im/bitlbee/files/${_Cbit}"
+ "${_gentoo_uri}/net-im/bitlbee/files/${_Ibit}"
+ "${_gentoo_uri}/app-emulation/xe-guest-utilities/files/${_Ixe}"
+ "${_Izfs}"
+ "${_Itherm}"
+ "${_gentoo_uri}/app-antivirus/clamav/files/${_CClam}"
+ "${_gentoo_uri}/app-antivirus/clamav/files/${_IClam}"
+ "${_gentoo_uri}/net-misc/networkmanager/files/${_CNM}"
+ "${_gentoo_uri}/net-misc/networkmanager/files/${_INM}"
+ "${_gentoo_uri}/net-misc/networkmanager/files/${_SNM}")
+
+pkgver() {
+ date +%Y%m%d
+}
+
+_shebang='s|#!/sbin/runscript|#!/usr/bin/openrc-run|'
+_runpath='s|/var/run|/run|g'
+_binpath='s|/usr/sbin|/usr/bin|g'
+
+
+package_bitlbee-openrc() {
+ pkgdesc="OpenRC bitlbee init script"
+ depends=('openrc-core' 'bitlbee')
+ backup=('etc/conf.d/bitlbee')
+ install=bitlbee.install
+
+ install -Dm755 "${srcdir}/${_Cbit}" "${pkgdir}/etc/conf.d/bitlbee"
+ install -Dm755 "${srcdir}/${_Ibit}" "${pkgdir}/etc/init.d/bitlbee"
+ local _p1='s|need logger net|need net\n use logger|'
+ sed -e "${_shebang}" -e "${_binpath}" -e "${_runpath}" -e "${_p1}" -e "${_p2}" -i "${pkgdir}/etc/init.d/bitlbee"
+}
+
+package_cpupower-openrc() {
+ pkgdesc="OpenRC cpupower init script"
+ depends=('openrc-core' 'cpupower')
+ backup=('etc/conf.d/cpupower')
+ install=cpupower.install
+
+ install -Dm755 "${srcdir}/${_Ccpu}" "${pkgdir}/etc/conf.d/cpupower"
+ install -Dm755 "${srcdir}/${_Icpu}" "${pkgdir}/etc/init.d/cpupower"
+
+ sed -e "${_shebang}" -i "${pkgdir}/etc/init.d/cpupower"
+}
+
+package_connman-openrc() {
+ pkgdesc="OpenRC connman init script"
+ depends=('openrc-core' 'connman')
+ backup=('etc/conf.d/connman')
+ install=connman.install
+
+ install -Dm755 "${srcdir}/${_Ccon}" "${pkgdir}/etc/conf.d/connman"
+ install -Dm755 "${srcdir}/${_Icon}" "${pkgdir}/etc/init.d/connman"
+
+ sed -e "${_shebang}" -e "${_binpath}" -i "${pkgdir}/etc/init.d/connman"
+}
+
+package_cups-openrc() {
+ pkgdesc="OpenRC cups init script"
+ depends=('cups' 'dbus-openrc')
+ optdepends=('avahi-openrc: avahi initscripts')
+ install=cups.install
+
+ install -Dm755 "${srcdir}/${_Icups}" "${pkgdir}/etc/init.d/cupsd"
+
+ local _p1='s|lp:lpadmin|daemon:sys|' \
+ _p2='s|@neededservices@|need dbus avahi-daemon|'
+ sed -e "${_shebang}" -e "${_binpath}" -e "${_p1}" -e "${_p2}" -i "${pkgdir}/etc/init.d/cupsd"
+}
+
+package_fcron-openrc() {
+ pkgdesc="OpenRC fcron init script"
+ depends=('openrc-core' 'fcron')
+ groups=('openrc-misc')
+ provides=('openrc-cron')
+ conflicts=('cronie'
+ 'cronie-openrc'
+ 'openrc'
+ 'openrc-git'
+ 'openrc-arch-services-git'
+ 'initscripts'
+ 'systemd-sysvcompat')
+ install=fcron.install
+
+ install -Dm755 "${srcdir}/${_Ifrcon}" "${pkgdir}/etc/init.d/fcron"
+
+ local _p1='s|/usr/libexec|/usr/bin|g'
+ sed -e "${_shebang}" -e "${_runpath}" -e "${_p1}" -i "${pkgdir}/etc/init.d/fcron"
+}
+
+package_ntp-openrc() {
+ pkgdesc="OpenRC ntp init script"
+ depends=('openrc-core' 'ntp')
+ optdepends=('bind-openrc: bind initscript')
+ provides=('openrc-timed')
+ conflicts=('openntpd'
+ 'openntpd-openrc'
+ 'openrc'
+ 'openrc-git'
+ 'openrc-arch-services-git'
+ 'initscripts'
+ 'systemd-sysvcompat')
+ backup=('etc/conf.d/ntpd'
+ 'etc/conf.d/ntp-client'
+ 'etc/init.d/sntp')
+ install=ntp.install
+
+ install -Dm755 "${srcdir}/${_Cntp1}" "${pkgdir}/etc/conf.d/ntpd"
+ install -Dm755 "${srcdir}/${_Intp1}" "${pkgdir}/etc/init.d/ntpd"
+ install -Dm755 "${srcdir}/${_Cntp2}" "${pkgdir}/etc/conf.d/ntp-client"
+ install -Dm755 "${srcdir}/${_Intp2}" "${pkgdir}/etc/init.d/ntp-client"
+ install -Dm755 "${srcdir}/${_Cntp3}" "${pkgdir}/etc/conf.d/sntp"
+ install -Dm755 "${srcdir}/${_Intp3}" "${pkgdir}/etc/init.d/sntp"
+
+ for f in ${pkgdir}/etc/init.d/*;do
+ sed -e "${_shebang}" -e "${_binpath}" -e "${_runpath}" -i $f
+ done
+}
+
+package_rsyslog-openrc() {
+ pkgdesc="OpenRC rsyslog init script"
+ depends=('openrc-core' 'rsyslog')
+ backup=('etc/conf.d/rsyslog')
+ install=rsyslog.install
+
+ install -Dm755 "${srcdir}/${_Crsysl}" "${pkgdir}/etc/conf.d/rsyslog"
+ install -Dm755 "${srcdir}/${_Irsysl}" "${pkgdir}/etc/init.d/rsyslog"
+
+ sed -e "${_shebang}" -e "${_binpath}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/rsyslog"
+}
+
+package_sane-openrc() {
+ pkgdesc="OpenRC sane init script"
+ depends=('openrc-core' 'sane')
+ backup=('etc/conf.d/saned')
+ install=sane.install
+
+ install -Dm755 "${srcdir}/${_Csane}" "${pkgdir}/etc/conf.d/saned"
+ install -Dm755 "${srcdir}/${_Isane}" "${pkgdir}/etc/init.d/saned"
+ local _p1='s|/run/saned/saned.pid|/run/saned.pid|'
+ sed -e "${_shebang}" -e "${_runpath}" -e "${_binpath}" -e ${_p1} -i ${pkgdir}/etc/init.d/saned
+}
+
+package_fuse-openrc(){
+ pkgdesc="OpenRC fuse init script"
+ depends=('openrc-core' 'fuse')
+ install=fuse.install
+
+ install -Dm755 "${srcdir}/${_Ifuse}" "${pkgdir}/etc/init.d/fuse"
+ sed -e "${_shebang}" -i "${pkgdir}/etc/init.d/fuse"
+}
+
+package_metalog-openrc() {
+ pkgdesc="OpenRC metalog init script"
+ depends=('openrc-core' 'metalog')
+ backup=('etc/conf.d/metalog')
+ install=metalog.install
+
+ install -Dm755 "${srcdir}/${_Cmeta}" "${pkgdir}/etc/conf.d/metalog"
+ install -Dm755 "${srcdir}/${_Imeta}" "${pkgdir}/etc/init.d/metalog"
+
+ sed -e "${_shebang}" -e "${_binpath}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/metalog"
+}
+
+package_syslog-ng-openrc() {
+ pkgdesc="OpenRC syslog-ng init script"
+ depends=('openrc-core' 'syslog-ng')
+ backup=('etc/conf.d/syslog-ng')
+ install=syslog-ng.install
+
+ install -Dm755 "${srcdir}/${_Csyslog}" "${pkgdir}/etc/conf.d/syslog-ng"
+ install -Dm755 "${srcdir}/${_Isyslog}" "${pkgdir}/etc/init.d/syslog-ng"
+
+ sed -e "${_shebang}" -e "${_binpath}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/syslog-ng"
+}
+
+package_lm_sensors-openrc() {
+ pkgdesc="OpenRC lm_sensors init script"
+ depends=('openrc-core' 'lm_sensors')
+ #backup=('etc/conf.d/sensord')
+ install=lm_sensors.install
+
+ #install -Dm755 "${srcdir}/${_Csens}" "${pkgdir}/etc/conf.d/sensord"
+ install -Dm755 "${srcdir}/${_Isens1}" "${pkgdir}/etc/init.d/sensord"
+ install -Dm755 "${srcdir}/${_Isens2}" "${pkgdir}/etc/init.d/fancontrol"
+ install -Dm755 "${srcdir}/${_Isens3}" "${pkgdir}/etc/init.d/lm_sensors"
+
+ for f in ${pkgdir}/etc/init.d/*; do
+ sed -e "${_shebang}" -e "${_binpath}" -e "${_runpath}" -i $f
+ done
+}
+
+package_lirc-utils-openrc() {
+ pkgdesc="OpenRC lirc-utils init script"
+ depends=('openrc-core' 'lirc-utils')
+ backup=('etc/conf.d/lircd'
+ 'etc/conf.d/irexec')
+ install=lirc-utils.install
+
+ install -Dm755 "${srcdir}/${_Clirc1}" "${pkgdir}/etc/conf.d/lircd"
+ install -Dm755 "${srcdir}/${_Ilirc1}" "${pkgdir}/etc/init.d/lircd"
+
+ install -Dm755 "${srcdir}/${_Clirc2}" "${pkgdir}/etc/conf.d/irexec"
+ install -Dm755 "${srcdir}/${_Ilirc2}" "${pkgdir}/etc/init.d/irexec"
+
+ install -Dm755 "${srcdir}/${_Ilirc3}" "${pkgdir}/etc/init.d/lircmd"
+
+ for f in ${pkgdir}/etc/init.d/*;do
+ sed -e "${_shebang}" -e "${_binpath}" -e "${_runpath}" -i $f
+ done
+}
+
+package_haveged-openrc() {
+ pkgdesc="OpenRC haveged init script"
+ depends=('openrc-core' 'haveged')
+ backup=('etc/conf.d/haveged')
+ install=haveged.install
+
+ install -Dm755 "${srcdir}/${_Chaveg}" "${pkgdir}/etc/conf.d/haveged"
+ install -Dm755 "${srcdir}/${_Ihaveg}" "${pkgdir}/etc/init.d/haveged"
+
+ sed -e "${_shebang}" -e "${_binpath}" -i "${pkgdir}/etc/init.d/haveged"
+}
+
+package_salt-openrc() {
+ pkgdesc="OpenRC salt init scripts"
+ depends=('openrc-core' 'salt')
+ backup=('etc/conf.d/salt-master'
+ 'etc/conf.d/salt-minion'
+ 'etc/conf.d/salt-syncdic')
+ install=salt.install
+
+ install -Dm755 "${srcdir}/${_Csalt_mtr}" "${pkgdir}/etc/conf.d/salt-master"
+ install -Dm755 "${srcdir}/${_Isalt_mtr}" "${pkgdir}/etc/init.d/salt-master"
+
+ install -Dm755 "${srcdir}/${_Csalt_min}" "${pkgdir}/etc/conf.d/salt-minion"
+ install -Dm755 "${srcdir}/${_Isalt_min}" "${pkgdir}/etc/init.d/salt-minion"
+
+ install -Dm755 "${srcdir}/${_Csalt_sync}" "${pkgdir}/etc/conf.d/salt-syncdic"
+ install -Dm755 "${srcdir}/${_Isalt_sync}" "${pkgdir}/etc/init.d/salt-syncdic"
+
+ for f in ${pkgdir}/etc/init.d/*;do
+ sed -e "${_shebang}" -e "${_runpath}" -i $f
+ done
+
+}
+
+package_mpd-openrc(){
+ pkgdesc="OpenRC fuse init script"
+ depends=('openrc-core' 'mpd')
+ install=mpd.install
+
+ install -Dm755 "${srcdir}/${_Impd}" "${pkgdir}/etc/init.d/mpd"
+ sed -e "${_shebang}" -i "${pkgdir}/etc/init.d/mpd"
+}
+
+package_hdparm-openrc() {
+ pkgdesc="OpenRC hdparm init script"
+ depends=('openrc-core' 'hdparm')
+ backup=('etc/conf.d/hdparm')
+ install=hdparm.install
+
+ install -Dm755 "${srcdir}/${_Chdparm}" "${pkgdir}/etc/conf.d/hdparm"
+ install -Dm755 "${srcdir}/${_Ihdparm}" "${pkgdir}/etc/init.d/hdparm"
+
+ sed -e "${_shebang}" -i "${pkgdir}/etc/init.d/hdparm"
+}
+
+package_thermald-openrc() {
+ pkgdesc="OpenRC thermald init script"
+ depends=('dbus-openrc' 'thermald')
+ install=thermald.install
+
+ install -Dm755 "${srcdir}/${_Itherm}" "${pkgdir}/etc/init.d/thermald"
+}
+
+package_xe-guest-utilities-openrc() {
+ pkgdesc="OpenRC xe-guest-utilities init script"
+ depends=('openrc-core' 'xe-guest-utilities')
+ install=xe-guest-utilities.install
+
+ install -Dm755 "${srcdir}/${_Ixe}" "${pkgdir}/etc/init.d/xe-daemon"
+
+ sed -e ${_shebang} -e ${_runpath} -e ${_binpath} \
+ -i ${pkgdir}/etc/init.d/xe-daemon
+}
+
+package_zfs-openrc() {
+ pkgdesc="OpenRC zfs init script"
+ depends=('openrc-core' 'zfs-utils')
+ install=zfs.install
+
+ install -Dm755 "${srcdir}/${_Izfs}" "${pkgdir}/etc/init.d/zfs"
+}
+
+package_clamav-openrc() {
+ pkgdesc="OpenRC clamav init script"
+ depends=('openrc-core' 'clamav')
+ backup=('etc/conf.d/clamd')
+ install=clamav.install
+
+ install -Dm755 "${srcdir}/${_CClam}" "${pkgdir}/etc/conf.d/clamd"
+ install -Dm755 "${srcdir}/${_IClam}" "${pkgdir}/etc/init.d/clamd"
+
+ sed -e "${_shebang}" -e "${_binpath}" -i "${pkgdir}/etc/init.d/clamd"
+}
+
+package_networkmanager-openrc() {
+ pkgdesc="OpenRC networkmanager init script"
+ depends=('openrc-core' 'networkmanager-consolekit')
+ backup=('etc/conf.d/NetworkManager')
+ install=networkmanager.install
+
+ install -Dm755 "${srcdir}/${_CNM}" "${pkgdir}/etc/conf.d/NetworkManager"
+ install -Dm755 "${srcdir}/${_INM}" "${pkgdir}/etc/init.d/NetworkManager"
+
+ install -Dm755 "${srcdir}/${_SNM}" "${pkgdir}/etc/NetworkManager/dispatcher.d/10-openrc-status"
+
+ sed -e 's|@EPREFIX@/sbin|/usr/bin|' \
+ -e 's|@EPREFIX@/usr/sbin|/usr/sbin|' \
+ -e 's|#!/bin/sh|#!/usr/bin/sh|' \
+ -i "${pkgdir}/etc/NetworkManager/dispatcher.d/10-openrc-status"
+
+ sed -e "${_shebang}" -e "${_binpath}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/NetworkManager"
+}
+
+sha256sums=('ceada7a1c9e8b62cff506bc94a1813706c7de1ed23daf9c3450ad549df4fafb7'
+ 'f0b15a0334f6177a6cf23cb9b169302c75745dc30857f24a7d11892feb6b1ee4'
+ '204c66d2b7d4d20115acc7499708cf538538fe1c100281ad55f909508041fb19'
+ '197e44ba1f438a18f5f7d9f5858feb19c1ece4286d82a5e63caf9be5b964aa76'
+ '4dd4e7fa07bf2ab2d4f5753156f5df0ad2277523f6755b0eab3d2db3480989e2'
+ '22a22c914d2a4f0fb5fc8495f4b7efcd1819efde548c9033ca612c181cd29eda'
+ 'ec9f05b386a06a4b2d5398cc0c33f34eba3f5e74ad46ae203d682f8ebc593f99'
+ '906c31e0817517dc6c141a7a10565140ea272d3c958a065f520a0ecb6f81912f'
+ 'b29325498ee3b1f3d63672efcd1e93f0745eecdb9f4bb05fed82a2f085399484'
+ 'aa027dac0d145bc342728864cd432a0cf3c25dd6cb66880e7b70df1a9d5a66cf'
+ 'd36ff77fa193a065d25e373723e03f1a9471205151b82c73a6574cce4f095962'
+ 'c404ad3b624004cab25bd3a89593cdeb0abbc25771d6e52caf2f37cb4f7b2b79'
+ '1b1f2970cc81a6053fcb6c0ead786436b6423c67170087dde283e54f32ae16e5'
+ '5e5a31fbd93294a6e210499a880fcab371b23706824c9d60d827b0187d7bade4'
+ 'd47f22a33a83c14a4a0c333d6a445c40e550c491899fb0c6d323e23fe1eac7b7'
+ '9ab6f022d2b2948660decf5e383984e6ddb9e9e5e6e2761c3031378ddd87e947'
+ '25f2a1665c88dc5227698bdedc2098d6e37d12d8b966f00e2a180c95a33cc8b4'
+ '4bd482a54decc5a51aee60e19ae31b0182d5857b112754247f04c0829b159b07'
+ '36d489296c31736f8015b0ce27052b3f1555b7fe6335120c0477b044b8e4fb8d'
+ '9b018f9f7a0975988387858823fe59a5cd8af6413d8c3170db0e24aac6021ec3'
+ '40803821f498267f6567436eedc18201b5ae4b5390d6872fb15a94200c2ac06f'
+ 'c7dc517cdb5ee10e2a07ccea15ec47ba0b7aff8ac1469204c8d7faf71bcae2c5'
+ '97282007801cb9c0e3b431e2930dec3bb8ce8869f63f7e02d903846e96734684'
+ '22a4b5e4c934ea8ba66764441b0bb60d31d23c147c8b64a4a035947327bfc3ec'
+ '2e4a42dd64b7c6dacfcfefdab8dc1e7c45d7a0966ef8b928583d18393362c719'
+ '8fbd405ad951e7ad046e4408abb98f4066077113187198767d52f28d7228bae4'
+ '4705b68372090ee7db69da1ad35131551ed1ba99032db2486ff6c31d2170ce6b'
+ '767a160c1b3392f0a12d3908a937548a2f604a9a121e744c309ee6f478420b02'
+ 'f0a561f124cac3791fba6ee7ef5bc3ea46bd7535edf9e864689b0d9cfa65d332'
+ '3b53f4aabf937766b5aa806561e9b97ab2be49ac25d76ae97f4fca4ab7a42e33'
+ '365e9cbde2564a0430d8d1c0f8bc367db2bb32937ebf61649196f0e6a1ab5363'
+ '9f3f47a7af4d349a7c525455616139b5019d3b7d0290398ba8c50ab91a62d089'
+ 'c5eed64899811966220d04e4b9849ba77d2d111f34dc16f03960cf1ff5ec02da'
+ '286148f5391d42c04a62a13cc125fa2130b5821e50da913c5a20d3a913e5f2d1'
+ '06415d7f958210a4dd1490db5796b0d3c08392a81547f290776d9164dde786ae'
+ '286148f5391d42c04a62a13cc125fa2130b5821e50da913c5a20d3a913e5f2d1'
+ '2de9f69462bc3b575a69a150b6bba21a6e341477010d284cb77614e810a7bf8c'
+ '3591473024005cdb15f13809c7675fbb964dc1b13e7658a01e12e34c7e751897'
+ '37c95ff723fa578e9039613d09dbf790d99113a318c065422986c744519214e9'
+ '434beee81ba04c96fcd03e6b37a4578c2c25af2c1007368469c48dd37523d56e'
+ '105afc0382fc5adc03ed644dba4e78817015a55432349f259a286ac3c1b06628'
+ '2eaef8071b34c1a3d55271d283b31e25e081791e48a6a55eb394912e4954ba48'
+ '24cbcf298b869e4451b08aeba0e3e4948aa7faaac649f18e8f600ae5fb86a8fb'
+ '7321272190ea9846ab7e19b034649c1cd711d4f94a6bdcaaaec2f683bb822e7d'
+ '4bbb4e610d2d6bb22d83aa2980dca052a23b90fa6985c8245601b716dec986f4'
+ '28ebd47810b0568fc7692218867d6804a1df70290681462f5555e230ca817732'
+ 'c00bb921afe65e31a9ac4bbcfc97e4c9afa7ad77604c2dcb7eedc152fec5bbd8'
+ '4594573f01fe5e04b6dde4525796acf909158591bdcefd662ec23fe0d1c3e1bd'
+ '5f368362ef5c6deed538f20dc582d6da3c86871bd42297fa78536c0312021843'
+ 'f8ed424818b866a0bf882c569f4484e8b1485ce7ac8c472f060fd877f2dcfe65')
diff --git a/pcr/openrc-misc/bitlbee.confd b/pcr/openrc-misc/bitlbee.confd
new file mode 100644
index 000000000..c4003ce43
--- /dev/null
+++ b/pcr/openrc-misc/bitlbee.confd
@@ -0,0 +1,2 @@
+#Bitlbee options (see /usr/sbin/bitlbee -h)
+BITLBEE_OPTS="-F"
diff --git a/pcr/openrc-misc/bitlbee.initd b/pcr/openrc-misc/bitlbee.initd
new file mode 100644
index 000000000..235b3744e
--- /dev/null
+++ b/pcr/openrc-misc/bitlbee.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or
+# later
+# $Header: /var/cvsroot/gentoo-x86/net-im/bitlbee/files/bitlbee.initd,v 1.4 2013/01/08 14:25:21 cedk Exp $
+
+DAEMON=/usr/sbin/bitlbee
+PIDFILE=/var/run/bitlbee/bitlbee.pid
+
+depend() {
+ need logger net
+}
+
+start () {
+ ebegin "Starting bitlbee"
+ checkpath -d -m 0755 -o bitlbee:bitlbee `dirname ${PIDFILE}`
+ start-stop-daemon --start --quiet \
+ -u bitlbee:bitlbee --exec ${DAEMON} -- -P ${PIDFILE} \
+ ${BITLBEE_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping bitlbee"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ eend $?
+}
+
diff --git a/pcr/openrc-misc/bitlbee.install b/pcr/openrc-misc/bitlbee.install
new file mode 100644
index 000000000..fad3f965b
--- /dev/null
+++ b/pcr/openrc-misc/bitlbee.install
@@ -0,0 +1,16 @@
+_svc="bitlbee"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/clamav.install b/pcr/openrc-misc/clamav.install
new file mode 100644
index 000000000..a7ee73e48
--- /dev/null
+++ b/pcr/openrc-misc/clamav.install
@@ -0,0 +1,16 @@
+_svc="calmd"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/clamd.conf-r1 b/pcr/openrc-misc/clamd.conf-r1
new file mode 100644
index 000000000..de95554ee
--- /dev/null
+++ b/pcr/openrc-misc/clamd.conf-r1
@@ -0,0 +1,7 @@
+# Config file for /etc/init.d/clamd
+
+START_CLAMD=yes
+START_FRESHCLAM=yes
+CLAMD_NICELEVEL=3
+FRESHCLAM_NICELEVEL=19
+IONICE_LEVEL=2
diff --git a/pcr/openrc-misc/clamd.initd-r6 b/pcr/openrc-misc/clamd.initd-r6
new file mode 100644
index 000000000..276e07aa8
--- /dev/null
+++ b/pcr/openrc-misc/clamd.initd-r6
@@ -0,0 +1,129 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.initd-r6,v 1.1 2013/09/27 16:04:14 eras Exp $
+
+daemon_clamd="/usr/sbin/clamd"
+daemon_freshclam="/usr/bin/freshclam"
+daemon_milter="/usr/sbin/clamav-milter"
+
+extra_commands="logfix"
+
+depend() {
+ use net
+ provide antivirus
+}
+
+get_config() {
+ clamconf | sed 's/["=]//g' | \
+ awk "{
+ if(\$0==\"Config file: $1.conf\") S=1
+ if(S==1&&\$0==\"\") {
+ print \"$3\"
+ exit
+ }
+ if(S==1&&\$1~\"^$2\$\") {
+ print \$2!=\"disabled\"?\$2:\"$3\"
+ exit
+ }
+ }"
+}
+
+start() {
+ # populate variables and fix log file permissions
+ logfix
+
+ if [ "${START_CLAMD}" = "yes" ]; then
+ checkpath --quiet --mode 755 \
+ --owner "${clamd_user}":"${clamd_user}" \
+ --directory `dirname ${clamd_socket}`
+ if [ -S "${clamd_socket}" ]; then
+ rm -f ${clamd_socket}
+ fi
+ ebegin "Starting clamd"
+ start-stop-daemon --start --quiet \
+ --nicelevel ${CLAMD_NICELEVEL:-0} \
+ --ionice ${IONICE_LEVEL:-0} \
+ --exec ${daemon_clamd}
+ eend $? "Failed to start clamd"
+ fi
+
+ if [ "${START_FRESHCLAM}" = "yes" ]; then
+ checkpath --quiet --mode 755 \
+ --owner "${clamd_user}":"${clamd_user}" \
+ --directory `dirname ${clamd_socket}`
+ ebegin "Starting freshclam"
+ start-stop-daemon --start --quiet \
+ --nicelevel ${FRESHCLAM_NICELEVEL:-0} \
+ --ionice ${IONICE_LEVEL:-0} \
+ --exec ${daemon_freshclam} -- -d
+ retcode=$?
+ if [ ${retcode} = 1 ]; then
+ eend 0
+ einfo "Virus databases are already up to date."
+ else
+ eend ${retcode} "Failed to start freshclam"
+ fi
+ fi
+
+ if [ "${START_MILTER}" = "yes" ]; then
+ if [ -z "${MILTER_CONF_FILE}" ]; then
+ MILTER_CONF_FILE="/etc/clamav-milter.conf"
+ fi
+
+ ebegin "Starting clamav-milter"
+ start-stop-daemon --start --quiet \
+ --nicelevel ${MILTER_NICELEVEL:-0} \
+ --ionice ${IONICE_LEVEL:-0} \
+ --exec ${daemon_milter} -- -c ${MILTER_CONF_FILE}
+ eend $? "Failed to start clamav-milter"
+ fi
+}
+
+stop() {
+ if [ "${START_CLAMD}" = "yes" ]; then
+ ebegin "Stopping clamd"
+ start-stop-daemon --stop --quiet --name clamd
+ eend $? "Failed to stop clamd"
+ fi
+ if [ "${START_FRESHCLAM}" = "yes" ]; then
+ ebegin "Stopping freshclam"
+ start-stop-daemon --stop --quiet --name freshclam
+ eend $? "Failed to stop freshclam"
+ fi
+ if [ "${START_MILTER}" = "yes" ]; then
+ ebegin "Stopping clamav-milter"
+ start-stop-daemon --stop --quiet --name clamav-milter
+ eend $? "Failed to stop clamav-milter"
+ fi
+}
+
+logfix() {
+ clamd_socket=$(get_config clamd LocalSocket /run/clamav/clamd.sock)
+ clamd_user=$(get_config clamd User clamav)
+ freshclam_user=$(get_config freshclam DatabaseOwner clamav)
+
+ if [ "${START_CLAMD}" = "yes" ]; then
+ # fix clamd log permissions
+ # (might be clobbered by logrotate or something)
+ local logfile=$(get_config clamd LogFile)
+ if [ -n "${logfile}" ]; then
+ checkpath --quiet \
+ --owner "${clamd_user}":"${clamd_user}" \
+ --mode 640 \
+ --file ${logfile}
+ fi
+ fi
+
+ if [ "${START_FRESHCLAM}" = "yes" ]; then
+ # fix freshclam log permissions
+ # (might be clobbered by logrotate or something)
+ local logfile=$(get_config freshclam UpdateLogFile)
+ if [ -n "${logfile}" ]; then
+ checkpath --quiet \
+ --owner "${freshclam_user}":"${freshclam_user}" \
+ --mode 640 \
+ --file ${logfile}
+ fi
+ fi
+}
diff --git a/pcr/openrc-misc/conf.d-r2 b/pcr/openrc-misc/conf.d-r2
new file mode 100644
index 000000000..1e67ed04e
--- /dev/null
+++ b/pcr/openrc-misc/conf.d-r2
@@ -0,0 +1,36 @@
+# /etc/conf.d/cpupower: config file for /etc/init.d/cpupower
+
+# Options when starting cpufreq (given to the `cpupower` program)
+# Possible options are:
+# -g --governor <GOV> (ie: ondemand, performance, or powersave)
+# -d --min <FREQ> (ie: 1000MHz)
+# -u --max <FREQ> (ie: 2000MHz)
+# -f --freq <FREQ> (requires userspace governor, this *can not* be combined with
+# with any other parameters).
+# Frequencies can be passed in Hz, kHz (default), MHz, GHz, or THz by postfixing the
+# value with the wanted unit name, without any space.
+# (frequency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000).
+
+START_OPTS="--governor ondemand"
+
+# Options when stopping cpufreq (given to the `cpupower` program)
+# This option can be used to change governer on stop. Leaving it empty will ensure
+# the governer remains on the one provided above.
+STOP_OPTS=""
+
+# Extra settings to write to sysfs cpufreq values.
+#
+# up_threshold: threshold for stepping up frequency, where the value represents
+# the percentage of cpu load.
+#
+# down_threshold: threshold for stepping down frequency, where the value
+# represents the percentage of cpu load.
+#
+# sampling_down_factor: determines how frequently the governor polls the cpu, a
+# value greater than 1 improves performance by reducing the polling when the
+# load is high. This tunable has no effect on behavior at lower CPU frequencies.
+#
+# ignore_nice_load: when set to '1' the processes that are run with a 'nice'
+# value will not count in the usage calculation.
+
+#SYSFS_EXTRA="ondemand/ignore_nice_load=1 ondemand/up_threshold=75 ondemand/sampling_down_factor=10"
diff --git a/pcr/openrc-misc/conf.d.NetworkManager b/pcr/openrc-misc/conf.d.NetworkManager
new file mode 100644
index 000000000..4a9922965
--- /dev/null
+++ b/pcr/openrc-misc/conf.d.NetworkManager
@@ -0,0 +1,4 @@
+# If NetworkManager does not establish a connection within $INACTIVE_TIMEOUT
+# seconds after starting, the service will be marked as inactive, and it will
+# continue to wait for a connection in background mode.
+INACTIVE_TIMEOUT=1
diff --git a/pcr/openrc-misc/connman.confd b/pcr/openrc-misc/connman.confd
new file mode 100644
index 000000000..6d0c399e5
--- /dev/null
+++ b/pcr/openrc-misc/connman.confd
@@ -0,0 +1,15 @@
+# conf.d file for connman
+#
+# Please check connmand --help for more information.
+# Useful options are:
+# -c, --compat: enable NetworkManager compatibility mode.
+# -W, --wifi=NAME: select wpa_supplicant wifi driver to use.
+# This is useful if your wpa_supplicant is < 0.7
+# since connmand by default gives wpa_supplicant a
+# comma separated list of values and < 0.7 does not
+# understand or accept it.
+# -i, --device=DEV: force use of given interface name.
+# -I, --nodevice=DEV: force ignore of given interface name.
+# -p, --plugin=NAME: specify plugins to load.
+# -P, --noplugin=NAME: specify plugins not to load.
+CONNMAN_OPTS=""
diff --git a/pcr/openrc-misc/connman.initd2 b/pcr/openrc-misc/connman.initd2
new file mode 100644
index 000000000..6525df40f
--- /dev/null
+++ b/pcr/openrc-misc/connman.initd2
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Purpose License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/connman/files/connman.initd2,v 1.1 2013/03/14 12:51:31 chainsaw Exp $
+
+depend() {
+ need dbus
+ provide net
+}
+
+start() {
+ ebegin "Starting Connection Manager"
+ start-stop-daemon --start --quiet --exec /usr/sbin/connmand -- ${CONNMAN_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Connection Manager"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/connmand
+ eend $?
+}
+
+# vim: set ft=gentoo-init-d ts=3 sw=3 et:
diff --git a/pcr/openrc-misc/connman.install b/pcr/openrc-misc/connman.install
new file mode 100644
index 000000000..47bc66b0b
--- /dev/null
+++ b/pcr/openrc-misc/connman.install
@@ -0,0 +1,16 @@
+_svc="connman"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/cpupower.install b/pcr/openrc-misc/cpupower.install
new file mode 100644
index 000000000..a611b3125
--- /dev/null
+++ b/pcr/openrc-misc/cpupower.install
@@ -0,0 +1,16 @@
+_svc="cpupower"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/cups.install b/pcr/openrc-misc/cups.install
new file mode 100644
index 000000000..622add958
--- /dev/null
+++ b/pcr/openrc-misc/cups.install
@@ -0,0 +1,16 @@
+_svc="cupsd"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/cupsd.init.d-r1 b/pcr/openrc-misc/cupsd.init.d-r1
new file mode 100644
index 000000000..2f2e9e2df
--- /dev/null
+++ b/pcr/openrc-misc/cupsd.init.d-r1
@@ -0,0 +1,26 @@
+#!/sbin/runscript
+
+depend() {
+ use net
+ @neededservices@
+ before nfs
+ after logger
+}
+
+start() {
+ ebegin "Starting cupsd"
+
+ checkpath -q -d -m 0775 -o root:lp /var/cache/cups
+ checkpath -q -d -m 0775 -o root:lp /var/cache/cups/rss
+ checkpath -q -d -m 0755 -o root:lp /run/cups
+ checkpath -q -d -m 0511 -o lp:lpadmin /run/cups/certs
+
+ start-stop-daemon --start --quiet --exec /usr/sbin/cupsd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cupsd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/cupsd
+ eend $?
+}
diff --git a/pcr/openrc-misc/fancontrol-init.d-2 b/pcr/openrc-misc/fancontrol-init.d-2
new file mode 100644
index 000000000..51857a1f7
--- /dev/null
+++ b/pcr/openrc-misc/fancontrol-init.d-2
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/lm_sensors/files/fancontrol-init.d-2,v 1.1 2012/12/28 00:00:03 flameeyes Exp $
+
+CONFIG=/etc/fancontrol
+
+depend() {
+ need localmount
+ use lm_sensors
+}
+
+command=/usr/sbin/fancontrol
+command_arguments="${CONFIG}"
+start_stop_daemon_args="--background"
+pidfile=/var/run/fancontrol.pid
+
+start_pre() {
+ if [ ! -f ${CONFIG} ]; then
+ eerror "Configuration file ${CONFIG} not found"
+ return 1
+ fi
+}
diff --git a/pcr/openrc-misc/fcron.init.3 b/pcr/openrc-misc/fcron.init.3
new file mode 100644
index 000000000..09c05c6d0
--- /dev/null
+++ b/pcr/openrc-misc/fcron.init.3
@@ -0,0 +1,58 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-process/fcron/files/fcron.init.3,v 1.1 2012/08/29 17:38:40 flameeyes Exp $
+
+FCRON_INSTANCE=${SVCNAME##*.}
+
+configfile() {
+ if [ -n "${FCRON_INSTANCE}" -a "${SVCNAME}" != "fcron" ]; then
+ echo /etc/fcron/fcron.${FCRON_INSTANCE}.conf
+ else
+ echo /etc/fcron/fcron.conf
+ fi
+}
+
+getconfig() {
+ # if there is no configuration file return the default value
+ if ! [ -f $(configfile) ]; then
+ echo $2
+ return 0
+ fi
+
+ sed -n -e 's:^$1[ \t]*=[ \t]*::p' $(configfile)
+}
+
+depend() {
+ config $(configfile)
+
+ use logger
+ need clock hostname
+ # provide the cron service if we are the main instance
+ [ "${SVCNAME}" = "fcron" ] && provide cron
+}
+
+command="/usr/libexec/fcron"
+command_args="-c $(configfile)"
+pidfile=$(getconfig pidfile /var/run/fcron.pid)
+fcrontabs=$(getconfig fcrontabs /var/spool/fcron)
+
+extra_started_commands="reload"
+
+start_pre() {
+ if [ ! -e $(configfile) ]; then
+ eerror "You will need to create $(configfile) first"
+ eerror "There is a sample in /etc/fcron"
+ return 1
+ fi
+
+ if [ ! -d ${fcrontabs} ]; then
+ ebegin "Creating missing spooldir ${fcrontabs}"
+ ${command} --newspooldir ${fcrontabs}
+ eend $?
+ fi
+}
+
+reload() {
+ kill -HUP `cat ${pidfile}`
+}
diff --git a/pcr/openrc-misc/fcron.install b/pcr/openrc-misc/fcron.install
new file mode 100644
index 000000000..400c0b6fb
--- /dev/null
+++ b/pcr/openrc-misc/fcron.install
@@ -0,0 +1,16 @@
+_svc="fcron"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/fuse.init b/pcr/openrc-misc/fuse.init
new file mode 100644
index 000000000..30b512e8d
--- /dev/null
+++ b/pcr/openrc-misc/fuse.init
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+MOUNTPOINT=/sys/fs/fuse/connections
+
+depend() {
+ need localmount
+}
+
+start() {
+
+ ebegin "Starting fuse"
+ if ! grep -qw fuse /proc/filesystems; then
+ modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module"
+ fi
+ if grep -qw fusectl /proc/filesystems && \
+ ! grep -qw $MOUNTPOINT /proc/mounts; then
+ mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1 || \
+ eerror $? "Error mounting control filesystem"
+ fi
+ eend ${?}
+
+}
+
+stop() {
+
+ ebegin "Stopping fuse"
+ if grep -qw $MOUNTPOINT /proc/mounts; then
+ umount $MOUNTPOINT >/dev/null 2>&1 || \
+ eerror $? "Error unmounting control filesystem"
+ fi
+ eend ${?}
+
+}
diff --git a/pcr/openrc-misc/fuse.install b/pcr/openrc-misc/fuse.install
new file mode 100644
index 000000000..8f52ae822
--- /dev/null
+++ b/pcr/openrc-misc/fuse.install
@@ -0,0 +1,16 @@
+_svc="fuse"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/haveged-conf.d b/pcr/openrc-misc/haveged-conf.d
new file mode 100644
index 000000000..3d9863c52
--- /dev/null
+++ b/pcr/openrc-misc/haveged-conf.d
@@ -0,0 +1,10 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/haveged/files/haveged-conf.d,v 1.1 2011/01/05 03:30:30 robbat2 Exp $
+
+WATERMARK=1024
+
+# -r0 is added always
+HAVEGED_OPTS="-w ${WATERMARK} -v 1"
+
+# vim:ft=gentoo-conf-d:
diff --git a/pcr/openrc-misc/haveged-init.d.3 b/pcr/openrc-misc/haveged-init.d.3
new file mode 100644
index 000000000..d43447d11
--- /dev/null
+++ b/pcr/openrc-misc/haveged-init.d.3
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/haveged/files/haveged-init.d.3,v 1.1 2013/01/25 16:58:06 flameeyes Exp $
+
+pidfile=/run/${SVCNAME}.pid
+
+command="/usr/sbin/${SVCNAME}"
+command_args="-r 0 ${HAVEGED_OPTS} -p ${pidfile}"
+
+depend() {
+ need localmount
+ use logger
+ provide entropy
+}
+
+# vim:ft=gentoo-init-d:
diff --git a/pcr/openrc-misc/haveged.install b/pcr/openrc-misc/haveged.install
new file mode 100644
index 000000000..788ba6d95
--- /dev/null
+++ b/pcr/openrc-misc/haveged.install
@@ -0,0 +1,16 @@
+_svc="haveged"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/hdparm-conf.d.3 b/pcr/openrc-misc/hdparm-conf.d.3
new file mode 100644
index 000000000..a1ae626b3
--- /dev/null
+++ b/pcr/openrc-misc/hdparm-conf.d.3
@@ -0,0 +1,26 @@
+# /etc/conf.d/hdparm: config file for /etc/init.d/hdparm
+
+#
+# Note that options such as -y which force *immediate* power saving options
+# should generally not be placed here. The hdparm init.d script may run at
+# anytime with respect to other init.d scripts that do system wide drive
+# scans (like the hald script), so they will merely get spun right back up.
+# If you wish to use these options, please use the local.start init.d script
+# instead so that you're guaranteed that it will run last.
+#
+
+# You can either set hdparm arguments for each drive using hdX_args,
+# discX_args, cdromX_args and genericX_args, e.g.
+#
+# hda_args="-d1 -X66"
+# disc1_args="-d1"
+# cdrom0_args="-d1"
+
+# or you can set options for all PATA drives
+pata_all_args="-d1"
+
+# or you can set options for all SATA drives
+sata_all_args=""
+
+# or, you can set hdparm options for all drives
+all_args=""
diff --git a/pcr/openrc-misc/hdparm-init-8 b/pcr/openrc-misc/hdparm-init-8
new file mode 100644
index 000000000..9a4200c82
--- /dev/null
+++ b/pcr/openrc-misc/hdparm-init-8
@@ -0,0 +1,61 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/hdparm/files/hdparm-init-8,v 1.3 2012/04/29 00:30:18 vapier Exp $
+
+depend() {
+ before bootmisc
+}
+
+do_hdparm() {
+ local e=
+ eval e=\$${extra_args}
+ [ -z "${args}${all_args}${e}" ] && return 0
+
+ if [ -n "${args:=${all_args} ${e}}" ] ; then
+ local orgdevice=$(readlink -f "${device}")
+ if [ -b "${orgdevice}" ] ; then
+ ebegin "Running hdparm on ${device}"
+ hdparm ${args} "${device}" > /dev/null
+ eend $?
+ fi
+ fi
+}
+
+scan_nondevfs() {
+ # non-devfs compatible system
+ local device
+
+ for device in /dev/hd* /dev/sd* /dev/cdrom* ; do
+ [ -e "${device}" ] || continue
+ case "${device}" in
+ *[0-9]) continue ;;
+ /dev/hd*) extra_args="pata_all_args" ;;
+ /dev/sd*) extra_args="sata_all_args" ;;
+ *) extra_args="_no_xtra_args" ;;
+ esac
+
+ # check that the block device really exists by
+ # opening it for reading
+ local errmsg= status= nomed=1
+ errmsg=$(export LC_ALL=C ; : 2>&1 <"${device}")
+ status=$?
+ case ${errmsg} in
+ *": No medium found") nomed=0;;
+ esac
+ if [ -b "${device}" ] && [ "${status}" = "0" -o "${nomed}" = "0" ] ; then
+ local conf_var="${device##*/}_args"
+ eval args=\$${conf_var}
+ do_hdparm
+ fi
+ done
+}
+
+start() {
+ if get_bootparam "nohdparm" ; then
+ ewarn "Skipping hdparm init as requested in kernel cmdline"
+ return 0
+ fi
+
+ scan_nondevfs
+}
diff --git a/pcr/openrc-misc/hdparm.install b/pcr/openrc-misc/hdparm.install
new file mode 100644
index 000000000..10cf616d6
--- /dev/null
+++ b/pcr/openrc-misc/hdparm.install
@@ -0,0 +1,16 @@
+_svc="hdparm"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/init.d-r4 b/pcr/openrc-misc/init.d-r4
new file mode 100644
index 000000000..789945b00
--- /dev/null
+++ b/pcr/openrc-misc/init.d-r4
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/cpupower/files/init.d-r4,v 1.1 2013/12/25 11:46:32 ssuominen Exp $
+
+CPUFREQ_SYSFS=/sys/devices/system/cpu/cpufreq
+
+change() {
+ local c ret=0 opts="$1"
+ if [ -n "$opts" ] ; then
+ ebegin "Running cpupower -c all frequency-set ${opts}"
+ cpupower -c all frequency-set ${opts} >/dev/null 2>&1
+ : $(( ret += $? ))
+ eend ${ret}
+
+ if [ -d ${CPUFREQ_SYSFS} ] && [ -n "${SYSFS_EXTRA}" ] ; then
+ c=1
+ einfo "Setting extra options: ${SYSFS_EXTRA}"
+ if cd ${CPUFREQ_SYSFS} ; then
+ local o v
+ for o in ${SYSFS_EXTRA} ; do
+ v=${o#*=}
+ o=${o%%=*}
+ echo ${v} > ${o} || break
+ done
+ c=0
+ fi
+ eend ${c}
+ : $(( ret += c ))
+ fi
+ fi
+
+ return ${ret}
+}
+
+start() {
+ change "${START_OPTS}"
+}
+
+stop() {
+ change "${STOP_OPTS}"
+}
diff --git a/pcr/openrc-misc/init.d.NetworkManager b/pcr/openrc-misc/init.d.NetworkManager
new file mode 100644
index 000000000..8465449d8
--- /dev/null
+++ b/pcr/openrc-misc/init.d.NetworkManager
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright (c) 2008 Saleem Abdulrasool <compnerd@compnerd.org>
+# Distributed under the terms of the GNU General Purpose License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/networkmanager/files/init.d.NetworkManager,v 1.1 2013/01/28 07:05:05 tetromino Exp $
+
+description="NetworkManager daemon. The service is marked as started only \
+when a network connection is established."
+
+depend() {
+ need dbus
+ provide net
+}
+
+start() {
+ # If we are re-called by a dispatcher event, we want to mark the service
+ # as started without starting the daemon again
+ yesno "${IN_BACKGROUND}" && return 0
+
+ [ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1"
+
+ ebegin "Starting NetworkManager"
+ start-stop-daemon --start --quiet --pidfile /run/NetworkManager/NetworkManager.pid \
+ --exec /usr/sbin/NetworkManager -- --pid-file /run/NetworkManager/NetworkManager.pid
+ local _retval=$?
+ eend "${_retval}"
+ if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then
+ einfo "Marking NetworkManager as inactive. It will automatically be marked"
+ einfo "as started after a network connection has been established."
+ mark_service_inactive
+ fi
+ return "${_retval}"
+}
+
+stop() {
+ # If we are re-called by a dispatcher event, we want to mark the service
+ # as inactive without stopping the daemon
+ if yesno "${IN_BACKGROUND}"; then
+ mark_service_inactive "${SVCNAME}"
+ return 0
+ fi
+
+ ebegin "Stopping NetworkManager"
+ local pidfile=/run/NetworkManager/NetworkManager.pid
+ if [ ! -e "${pidfile}" ] && [ -e /var/run/NetworkManager.pid ]; then
+ # Try stopping the pid file used by <0.9.7
+ pidfile=/var/run/NetworkManager.pid
+ start-stop-daemon --stop --quiet --pidfile "${pidfile}"
+ ret=$?
+ [ ${ret} = 0 ] && [ -e "${pidfile}" ] && rm "${pidfile}"
+ eend ${ret}
+ else
+ start-stop-daemon --stop --quiet --pidfile "${pidfile}"
+ eend $?
+ fi
+}
+
+# vim: set ft=gentoo-init-d ts=4 :
diff --git a/pcr/openrc-misc/irexec-confd b/pcr/openrc-misc/irexec-confd
new file mode 100644
index 000000000..48eb8dd4c
--- /dev/null
+++ b/pcr/openrc-misc/irexec-confd
@@ -0,0 +1,9 @@
+# Options to pass to the irexec process
+IREXEC_OPTS="/etc/lircrc"
+
+# User to execute irexec as.
+# Warning: Running irexec as root can open security holes
+#IREXEC_USER="root"
+
+# Use this to disable the warning printed when starting irexec as root
+# IREXEC_DISABLE_ROOT_WARNING=yes
diff --git a/pcr/openrc-misc/irexec-initd-0.8.6-r2 b/pcr/openrc-misc/irexec-initd-0.8.6-r2
new file mode 100644
index 000000000..567322a43
--- /dev/null
+++ b/pcr/openrc-misc/irexec-initd-0.8.6-r2
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 2003 Martin Hierling <mad@cc.fh-lippe.de>
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/files/irexec-initd-0.8.6-r2,v 1.1 2009/11/15 10:04:21 zzam Exp $
+
+: ${IREXEC_USER:=root}
+
+depend() {
+ need lirc
+}
+
+start() {
+ if [ "x${IREXEC_USER}" = "xroot" -a "x${IREXEC_DISABLE_ROOT_WARNING}" != "xyes" ]; then
+ ewarn "Warning: Running irexec as root can open security holes"
+ fi
+
+ ebegin "Starting irexec"
+ start-stop-daemon --start --chuid ${IREXEC_USER} --user ${IREXEC_USER} --chdir / \
+ --exec /usr/bin/irexec -- --daemon ${IREXEC_OPTS}
+ eend $? "Failed to start irexec."
+}
+
+stop() {
+ ebegin "Stopping irexec"
+ start-stop-daemon --stop --exec /usr/bin/irexec --user ${IREXEC_USER}
+ eend $? "Failed to stop irexec."
+}
+
diff --git a/pcr/openrc-misc/lirc-utils.install b/pcr/openrc-misc/lirc-utils.install
new file mode 100644
index 000000000..f76dbdade
--- /dev/null
+++ b/pcr/openrc-misc/lirc-utils.install
@@ -0,0 +1,16 @@
+_svc="lircd"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/lircd-0.8.6-r2 b/pcr/openrc-misc/lircd-0.8.6-r2
new file mode 100644
index 000000000..d6f16ba07
--- /dev/null
+++ b/pcr/openrc-misc/lircd-0.8.6-r2
@@ -0,0 +1,52 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/files/lircd-0.8.6-r2,v 1.2 2014/01/23 21:37:11 vapier Exp $
+
+PIDFILE=/var/run/lirc/${SVCNAME}.pid
+: ${LIRCD_SYMLINKFILE:=/dev/lircd}
+: ${LIRCD_SOCKET:=/var/run/lirc/lircd}
+
+depend() {
+ need localmount
+ use modules
+ provide lirc
+}
+
+start() {
+ local retval
+
+ ebegin "Starting lircd"
+
+ for retval in ${LIRCD_SET_SYSCLASSRCS} ; do
+ if [ -e /sys/class/rc/${retval}/protocols ] && \
+ grep -qs 'lirc' /sys/class/rc/${retval}/protocols ; then
+ einfo "Setting lirc protocol active for ${retval}"
+ echo lirc >/sys/class/rc/${retval}/protocols
+ fi
+ done
+
+ checkpath -q -d -m 0755 -o root:root /var/run/lirc
+ rm -Rf ${LIRCD_SOCKET} && ln -s ${LIRCD_SOCKET} ${LIRCD_SYMLINKFILE}
+ if [ $? -ne 0 ]; then
+ eend $? "Unable to create symbolic link ${LIRCD_SYMLINKFILE}"
+ return 1
+ fi
+
+ start-stop-daemon --start --quiet --pidfile "${PIDFILE}" --exec /usr/sbin/lircd -- \
+ -P "${PIDFILE}" ${LIRCD_OPTS}
+ retval=$?
+
+ if [ ${retval} -ne 0 ]; then
+ rm -Rf ${LIRCD_SOCKET}
+ fi
+
+ eend ${retval}
+}
+
+stop() {
+ ebegin "Stopping lircd"
+ rm -f ${LIRCD_SYMLINKFILE}
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" --exec /usr/sbin/lircd
+ eend $?
+}
diff --git a/pcr/openrc-misc/lircd.conf.4 b/pcr/openrc-misc/lircd.conf.4
new file mode 100644
index 000000000..f59c5f214
--- /dev/null
+++ b/pcr/openrc-misc/lircd.conf.4
@@ -0,0 +1,22 @@
+# Options to pass to the lircd process
+
+# for devices with lirc-kernel-module
+#LIRCD_OPTS="-d /dev/lirc0"
+#LIRCD_OPTS="-d /dev/lirc"
+
+# for devices using the input-layer
+#LIRCD_OPTS="-H devinput -d /dev/input/by-path/pci-0000:00:0a.0--event-ir"
+# This should work, Bug #235107
+#LIRCD_OPTS="-H devinput -d name=*DVB*"
+
+# set default protocol to 'lirc' for in-kernel IR decoding
+# for the following entries in /sys/class/rc/
+# (space-separated list if there is more than one)
+LIRCD_SET_SYSCLASSRCS="rc0"
+
+# If running mulitple instances of lircd, the following
+# can be used to override the default socket path and
+# socket symlink
+#LIRCD_SOCKET="/var/run/lirc/lircd"
+#LIRCD_SYMLINKFILE="/dev/lircd"
+
diff --git a/pcr/openrc-misc/lircmd b/pcr/openrc-misc/lircmd
new file mode 100644
index 000000000..d3837781f
--- /dev/null
+++ b/pcr/openrc-misc/lircmd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/files/lircmd,v 1.2 2004/09/28 00:22:15 swegener Exp $
+
+depend() {
+ need lircd
+}
+
+start() {
+ ebegin "Starting lircmd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/lircmd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping lircmd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/lircmd
+ eend $?
+}
diff --git a/pcr/openrc-misc/lm_sensors-3-init.d b/pcr/openrc-misc/lm_sensors-3-init.d
new file mode 100644
index 000000000..18fb35370
--- /dev/null
+++ b/pcr/openrc-misc/lm_sensors-3-init.d
@@ -0,0 +1,105 @@
+#!/sbin/runscript
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/lm_sensors/files/lm_sensors-3-init.d,v 1.1 2008/03/17 07:59:28 dberkholz Exp $
+
+checkconfig() {
+ if [ ! -f /etc/conf.d/lm_sensors ]; then
+ eerror "/etc/conf.d/lm_sensors does not exist, try running sensors-detect"
+ return 1
+ fi
+
+ if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
+ if [ -z "${MODULE_0}" ]; then
+ eerror "MODULE_0 is not set in /etc/conf.d/lm_sensors, try running sensors-detect"
+ return 1
+ fi
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
+ einfo "Loading lm_sensors modules..."
+
+ mount | grep sysfs >/dev/null 2>&1
+ if [ ${?} = 0 ]; then
+ if ! ( [ -e /sys/i2c ] || [ -e /sys/bus/i2c ] ); then
+ ebegin " Loading i2c-core"
+ modprobe i2c-core >/dev/null 2>&1
+ if [ ${?} != 0 ]; then
+ eerror " Could not load i2c-core!"
+ eend 1
+ fi
+ ( [ -e /sys/i2c ] || [ -e /sys/bus/i2c ] ) || return 1
+ eend 0
+ fi
+ elif ! [ -e /proc/sys/dev/sensors ]; then
+ ebegin " Loading i2c-proc"
+ modprobe i2c-proc >/dev/null 2>&1
+ if [ ${?} != 0 ]; then
+ eerror " Could not load i2c-proc!"
+ eend 1
+ fi
+ [ -e /proc/sys/dev/sensors ] || return 1
+ eend 0
+ fi
+
+ i=0
+ while true; do
+ module=`eval echo '$'MODULE_${i}`
+ module_args=`eval echo '$'MODULE_${i}_ARGS`
+ if [ -z "${module}" ]; then
+ break
+ fi
+ ebegin " Loading ${module}"
+ modprobe ${module} ${module_args} >/dev/null 2>&1
+ eend $?
+ i=$(($i+1))
+ done
+ fi
+
+ if [ "${INITSENSORS}" = "yes" ]; then
+ if ! [ -f /etc/sensors3.conf ]; then
+ eerror "/etc/sensors3.conf does not exist!"
+ return 1
+ fi
+
+ ebegin "Initializing sensors"
+ /usr/bin/sensors -s >/dev/null 2>&1
+ eend ${?}
+ fi
+}
+
+stop() {
+ checkconfig || return 1
+
+ if [ "${LOADMODULES}" = "yes" -a -f /proc/modules ]; then
+ einfo "Unloading lm_sensors modules..."
+
+ # find the highest possible MODULE_ number
+ i=0
+ while true; do
+ module=`eval echo '$'MODULE_${i}`
+ if [ -z "${module}" ] ; then
+ break
+ fi
+ i=$(($i+1))
+ done
+
+ while [ ${i} -gt 0 ]; do
+ i=$(($i-1))
+ module=`eval echo '$'MODULE_${i}`
+ ebegin " Unloading ${module}"
+ rmmod ${module} >/dev/null 2>&1
+ eend $?
+ done
+
+ if [ -e /proc/sys/dev/sensors ] ; then
+ ebegin " Unloading i2c-proc"
+ rmmod i2c-proc >/dev/null 2>&1
+ eend $?
+ fi
+ fi
+}
diff --git a/pcr/openrc-misc/lm_sensors.install b/pcr/openrc-misc/lm_sensors.install
new file mode 100644
index 000000000..8b9260556
--- /dev/null
+++ b/pcr/openrc-misc/lm_sensors.install
@@ -0,0 +1,28 @@
+_svc=('lm_sensors' 'fancontrol' 'sensord')
+_rlvl=('boot' 'default')
+
+post_install() {
+ _cmd="rc-update add ${_svc[0]} ${_rlvl[0]}"
+ echo " ==> run '${_cmd}'"
+ _cmd="rc-update add ${_svc[1]} ${_rlvl[1]}"
+ echo " ==> run '${_cmd}'"
+ _cmd="rc-update add ${_svc[2]} ${_rlvl[1]}"
+ echo " ==> run '${_cmd}'"
+
+
+ echo "To set command args for ${_svc[2]}, add 'SENSORD_OPTIONS=""'"
+ echo "to /etc/conf.d/sensord"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc[0]} ${_rlvl[0]}"
+ echo " ==> run '${_cmd}'"
+ _cmd="rc-update del ${_svc[1]} ${_rlvl[1]}"
+ echo " ==> run '${_cmd}'"
+ _cmd="rc-update del ${_svc[2]} ${_rlvl[1]}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/master-confd-1 b/pcr/openrc-misc/master-confd-1
new file mode 100644
index 000000000..c70e8e766
--- /dev/null
+++ b/pcr/openrc-misc/master-confd-1
@@ -0,0 +1,5 @@
+# /etc/conf.d/salt-master: config file for /etc/init.d/salt-master
+
+# see man pages for salt-minion or run `salt-master --help`
+# for valid cmdline options
+SALT_OPTS="--log-level=warning"
diff --git a/pcr/openrc-misc/master-initd-3 b/pcr/openrc-misc/master-initd-3
new file mode 100644
index 000000000..f9b102198
--- /dev/null
+++ b/pcr/openrc-misc/master-initd-3
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/salt/files/master-initd-3,v 1.1 2014/02/27 00:02:32 chutzpah Exp $
+
+command="/usr/bin/salt-master"
+command_args="${SALT_OPTS}"
+command_background="1"
+pidfile="/var/run/salt-master.pid"
+name="SALT master daemon"
+
+depend() {
+ use net logger
+}
diff --git a/pcr/openrc-misc/metalog.confd b/pcr/openrc-misc/metalog.confd
new file mode 100644
index 000000000..caa5918d3
--- /dev/null
+++ b/pcr/openrc-misc/metalog.confd
@@ -0,0 +1,19 @@
+# /etc/conf.d/metalog
+# $Header: /var/cvsroot/gentoo-x86/app-admin/metalog/files/metalog.confd,v 1.7 2006/02/08 01:04:02 vapier Exp $
+
+# Some useful options:
+# -a Log with buffering
+# -s Log without buffering
+# See `metalog --help` for more
+
+METALOG_OPTS=""
+
+
+# Options used by /usr/sbin/consolelog.sh
+
+# Space delimited list of devices to write "console" messages to
+#CONSOLE="/dev/console /dev/tty10"
+CONSOLE="/dev/tty10"
+
+# Format of logging (make sure you use single quotes)
+FORMAT='$1 [$2] $3'
diff --git a/pcr/openrc-misc/metalog.initd b/pcr/openrc-misc/metalog.initd
new file mode 100644
index 000000000..7f1d29282
--- /dev/null
+++ b/pcr/openrc-misc/metalog.initd
@@ -0,0 +1,42 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/metalog/files/metalog.initd,v 1.5 2011/09/23 03:15:23 vapier Exp $
+
+extra_started_commands="buffer unbuffer"
+
+PIDFILE=/var/run/metalog.pid
+
+depend() {
+ need localmount
+ use clock hostname
+ after bootmisc
+ provide logger
+}
+
+ssd() { start-stop-daemon --exec /usr/sbin/metalog --pidfile "${PIDFILE}" "$@" ; }
+
+start() {
+ ebegin "Starting metalog"
+ ssd --start -- \
+ --daemonize --pidfile="${PIDFILE}" ${METALOG_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping metalog"
+ ssd --stop
+ eend $?
+}
+
+buffer() {
+ ebegin "Enabling log buffering"
+ ssd --signal USR2
+ eend $?
+}
+
+unbuffer() {
+ ebegin "Disabling log buffering"
+ ssd --signal USR1
+ eend $?
+}
diff --git a/pcr/openrc-misc/metalog.install b/pcr/openrc-misc/metalog.install
new file mode 100644
index 000000000..b2551c296
--- /dev/null
+++ b/pcr/openrc-misc/metalog.install
@@ -0,0 +1,15 @@
+_svc="metalog"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/minion-confd-1 b/pcr/openrc-misc/minion-confd-1
new file mode 100644
index 000000000..d69d83fcd
--- /dev/null
+++ b/pcr/openrc-misc/minion-confd-1
@@ -0,0 +1,5 @@
+# /etc/conf.d/salt-minion: config file for /etc/init.d/salt-minion
+
+# see man pages for salt-minion or run `salt-minion --help`
+# for valid cmdline options
+SALT_OPTS="--log-level=warning"
diff --git a/pcr/openrc-misc/minion-initd-3 b/pcr/openrc-misc/minion-initd-3
new file mode 100644
index 000000000..bf57cbd5c
--- /dev/null
+++ b/pcr/openrc-misc/minion-initd-3
@@ -0,0 +1,15 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/salt/files/minion-initd-3,v 1.1 2014/02/27 00:02:32 chutzpah Exp $
+
+command="/usr/bin/salt-minion"
+command_args="${SALT_OPTS}"
+command_background="1"
+pidfile="/var/run/salt-minion.pid"
+name="SALT minion daemon"
+
+depend() {
+ need net
+ use logger
+}
diff --git a/pcr/openrc-misc/mpd.install b/pcr/openrc-misc/mpd.install
new file mode 100644
index 000000000..23e74affa
--- /dev/null
+++ b/pcr/openrc-misc/mpd.install
@@ -0,0 +1,16 @@
+_svc="mpd"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/mpd2.init b/pcr/openrc-misc/mpd2.init
new file mode 100644
index 000000000..53f5a02de
--- /dev/null
+++ b/pcr/openrc-misc/mpd2.init
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-sound/mpd/files/mpd2.init,v 1.1 2014/04/15 16:35:25 angelos Exp $
+
+depend() {
+ need localmount
+ use net netmount nfsmount alsasound esound pulseaudio
+}
+
+checkconfig() {
+ if ! [ -f /etc/mpd.conf ]; then
+ eerror "Configuration file /etc/mpd.conf does not exist."
+ return 1
+ fi
+
+ if ! grep -q ^pid_file /etc/mpd.conf; then
+ eerror "Invalid configuration: pid_file needs to be set."
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting Music Player Daemon"
+ start-stop-daemon --start --quiet --exec /usr/bin/mpd -- /etc/mpd.conf 2>/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Music Player Daemon"
+ /usr/bin/mpd --kill
+ eend $?
+}
diff --git a/pcr/openrc-misc/networkmanager.install b/pcr/openrc-misc/networkmanager.install
new file mode 100644
index 000000000..c4c741cdf
--- /dev/null
+++ b/pcr/openrc-misc/networkmanager.install
@@ -0,0 +1,18 @@
+_svc="NetworkManager"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ # For transition from old nm-openrc
+ rc-update del networkmanager
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/ntp-client.confd b/pcr/openrc-misc/ntp-client.confd
new file mode 100644
index 000000000..786004da8
--- /dev/null
+++ b/pcr/openrc-misc/ntp-client.confd
@@ -0,0 +1,21 @@
+# /etc/conf.d/ntp-client
+
+# Command to run to set the clock initially
+# Most people should just leave this line alone ...
+# however, if you know what you're doing, and you
+# want to use ntpd to set the clock, change this to 'ntpd'
+NTPCLIENT_CMD="ntpdate"
+
+# Options to pass to the above command
+# This default setting should work fine but you should
+# change the default 'pool.ntp.org' to something closer
+# to your machine. See http://www.pool.ntp.org/ or
+# try running `netselect -s 3 pool.ntp.org`.
+NTPCLIENT_OPTS="-s -b -u \
+ 0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org \
+ 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
+
+# If you use hostnames above, then you should depend on dns
+# being up & running before we try to run. Otherwise, you
+# can disable this.
+rc_use="dns"
diff --git a/pcr/openrc-misc/ntp-client.rc b/pcr/openrc-misc/ntp-client.rc
new file mode 100644
index 000000000..3a8b15e80
--- /dev/null
+++ b/pcr/openrc-misc/ntp-client.rc
@@ -0,0 +1,32 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.13 2013/12/24 11:01:52 vapier Exp $
+
+depend() {
+ before cron portmap
+ after net
+ use dns logger
+}
+
+checkconfig() {
+ if ! type "${NTPCLIENT_CMD}" >/dev/null 2>&1 ; then
+ eerror "Please edit /etc/conf.d/ntp-client"
+ eerror "Unable to locate the client command ${NTPCLIENT_CMD}!"
+ return 1
+ fi
+ if [ -z "${NTPCLIENT_OPTS}" ] ; then
+ eerror "Please edit /etc/conf.d/ntp-client"
+ eerror "I need to know what server/options to use!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
+ "${NTPCLIENT_CMD}" ${NTPCLIENT_OPTS}
+ eend $? "Failed to set clock"
+}
diff --git a/pcr/openrc-misc/ntp.install b/pcr/openrc-misc/ntp.install
new file mode 100644
index 000000000..1d3385ea9
--- /dev/null
+++ b/pcr/openrc-misc/ntp.install
@@ -0,0 +1,16 @@
+_svc="ntpd"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/ntpd.confd b/pcr/openrc-misc/ntpd.confd
new file mode 100644
index 000000000..2b74282c5
--- /dev/null
+++ b/pcr/openrc-misc/ntpd.confd
@@ -0,0 +1,6 @@
+# /etc/conf.d/ntpd
+
+# Options to pass to the ntpd process
+# Most people should leave this line alone ...
+# however, if you know what you're doing, feel free to tweak
+NTPD_OPTS="-g -u ntp:ntp"
diff --git a/pcr/openrc-misc/ntpd.rc-r1 b/pcr/openrc-misc/ntpd.rc-r1
new file mode 100644
index 000000000..1a34bb2f2
--- /dev/null
+++ b/pcr/openrc-misc/ntpd.rc-r1
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.rc-r1,v 1.2 2014/12/23 17:43:25 floppym Exp $
+
+description="ntpd - the network time protocol daemon"
+pidfile="/var/run/ntpd.pid"
+command="/usr/sbin/ntpd"
+command_args="-p ${pidfile} ${NTPD_OPTS}"
+start_stop_daemon_args="--pidfile ${pidfile}"
+
+depend() {
+ use net dns logger
+ after ntp-client
+}
+
+start_pre() {
+ if [ ! -f /etc/ntp.conf ] ; then
+ eerror "Please create /etc/ntp.conf"
+ return 1
+ fi
+ return 0
+}
diff --git a/pcr/openrc-misc/rsyslog.confd b/pcr/openrc-misc/rsyslog.confd
new file mode 100644
index 000000000..d8cbe8759
--- /dev/null
+++ b/pcr/openrc-misc/rsyslog.confd
@@ -0,0 +1,30 @@
+# /etc/conf.d/rsyslog
+
+# Configuration file
+RSYSLOG_CONFIGFILE="/etc/rsyslog.conf"
+
+# PID file
+# If you should ever change this, remember to update
+# "/etc/logrotate.d/rsyslog", too.
+RSYSLOG_PIDFILE="/run/rsyslogd.pid"
+
+# You can use this configuration option to pass additional options to the
+# start-stop-daemon, see start-stop-daemon(8) for more details.
+# Per default we wait 1000ms after we have started the service to ensure
+# that the daemon is really up and running.
+RSYSLOG_SSDARGS="--wait 1000"
+
+# The termination timeout (start-stop-daemon parameter "retry") ensures
+# that the service will be terminated within a given time (60 + 5 seconds
+# per default) when you are stopping the service.
+# You need to increase the value when you are working with a large queue.
+# See http://www.rsyslog.com/doc/queues.html for further information.
+RSYSLOG_TERMTIMEOUT="TERM/60/KILL/5"
+
+
+# Options to rsyslogd
+# See rsyslogd(8) for more details
+# Notes:
+# * Do not specify another PIDFILE but use the variable above to change the location
+# * Do not specify another CONFIGFILE but use the variable above to change the location
+RSYSLOG_OPTS=""
diff --git a/pcr/openrc-misc/rsyslog.initd b/pcr/openrc-misc/rsyslog.initd
new file mode 100644
index 000000000..ec831d7f8
--- /dev/null
+++ b/pcr/openrc-misc/rsyslog.initd
@@ -0,0 +1,69 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/rsyslog/files/8-stable/rsyslog.initd,v 1.1 2014/09/30 13:09:39 polynomial-c Exp $
+
+RSYSLOG_CONFIGFILE=${RSYSLOG_CONFIGFILE:-"/etc/rsyslog.conf"}
+RSYSLOG_PIDFILE=${RSYSLOG_PIDFILE:-"/run/rsyslogd.pid"}
+
+command="/usr/sbin/rsyslogd"
+command_args="${RSYSLOG_OPTS} -f ${RSYSLOG_CONFIGFILE} -i ${RSYSLOG_PIDFILE}"
+start_stop_daemon_args="${RSYSLOG_SSDARGS}"
+pidfile="${RSYSLOG_PIDFILE}"
+retry="${RSYSLOG_TERMTIMEOUT}"
+
+required_files="${RSYSLOG_CONFIGFILE}"
+
+description="RSYSLOG is the rocket-fast system for log processing (syslog replacement)."
+
+extra_commands="configtest"
+extra_started_commands="rotate"
+
+description_configtest="Run rsyslogd's internal config check."
+
+description_rotate="Sends rsyslogd a signal to re-open its log files."
+
+depend() {
+ need clock hostname localmount
+ provide logger
+}
+
+start_pre() {
+ if [ "${RC_CMD}" != "restart" ]; then
+ configtest || return 1
+ fi
+}
+
+stop_pre() {
+ if [ "${RC_CMD}" = "restart" ]; then
+ configtest || return 1
+ fi
+}
+
+stop_post() {
+ rm -f ${RSYSLOG_PIDFILE}
+}
+
+configtest() {
+ # This will currently only detect fatal errors
+ # See https://github.com/rsyslog/rsyslog/issues/79
+
+ local _test_command="${command} -N 999 -f ${RSYSLOG_CONFIGFILE}"
+ local _retval=0
+
+ ebegin "Checking rsyslogd's configuration"
+ ${_test_command} >/dev/null 2>&1
+ _retval=$?
+
+ if [ ${_retval} -ne 0 ]; then
+ ${_test_command}
+ fi
+
+ eend ${_retval} "failed, please correct errors above"
+}
+
+rotate() {
+ ebegin "Re-opening rsyslogd logs"
+ start-stop-daemon --signal SIGHUP --pidfile "${RSYSLOG_PIDFILE}"
+ eend $?
+}
diff --git a/pcr/openrc-misc/rsyslog.install b/pcr/openrc-misc/rsyslog.install
new file mode 100644
index 000000000..29b64a783
--- /dev/null
+++ b/pcr/openrc-misc/rsyslog.install
@@ -0,0 +1,16 @@
+_svc="rsyslog"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/salt.install b/pcr/openrc-misc/salt.install
new file mode 100644
index 000000000..0cc3bd3d3
--- /dev/null
+++ b/pcr/openrc-misc/salt.install
@@ -0,0 +1,24 @@
+_svc=('salt-master' 'salt-minion' 'salt-syncdic')
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc[0]} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+ _cmd="rc-update add ${_svc[1]} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+ _cmd="rc-update add ${_svc[2]} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc[0]} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+ _cmd="rc-update del ${_svc[1]} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+ _cmd="rc-update del ${_svc[2]} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/sane.install b/pcr/openrc-misc/sane.install
new file mode 100644
index 000000000..397a63087
--- /dev/null
+++ b/pcr/openrc-misc/sane.install
@@ -0,0 +1,16 @@
+_svc="saned"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/saned.confd b/pcr/openrc-misc/saned.confd
new file mode 100644
index 000000000..adb1eab2c
--- /dev/null
+++ b/pcr/openrc-misc/saned.confd
@@ -0,0 +1,2 @@
+# The user saned should drop its privileges to after startup
+#SANED_USER=""
diff --git a/pcr/openrc-misc/saned.initd b/pcr/openrc-misc/saned.initd
new file mode 100644
index 000000000..26498dd71
--- /dev/null
+++ b/pcr/openrc-misc/saned.initd
@@ -0,0 +1,12 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-gfx/sane-backends/files/saned.initd,v 1.1 2013/03/15 08:15:52 phosphan Exp $
+
+pidfile="/var/run/saned/saned.pid"
+command="/usr/sbin/saned"
+command_args="-a ${SANED_USER:-root}"
+
+start_pre() {
+ checkpath -d -o ${SANED_USER:-root} ${pidfile%/*}
+}
diff --git a/pcr/openrc-misc/sensord-4-init.d b/pcr/openrc-misc/sensord-4-init.d
new file mode 100644
index 000000000..293341c69
--- /dev/null
+++ b/pcr/openrc-misc/sensord-4-init.d
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/lm_sensors/files/sensord-4-init.d,v 1.3 2013/09/17 20:05:50 pacho Exp $
+
+CONFIG=/etc/sensors3.conf
+
+depend() {
+ need localmount
+ use logger lm_sensors
+}
+
+pidfile=/run/sensord.pid
+command=/usr/sbin/sensord
+command_args="--config-file ${CONFIG} ${SENSORD_OPTIONS} --pid-file ${pidfile}"
+
+start_pre() {
+ if [ ! -f ${CONFIG} ]; then
+ eerror "Configuration file ${CONFIG} not found"
+ return 1
+ fi
+}
diff --git a/pcr/openrc-misc/sntp.confd b/pcr/openrc-misc/sntp.confd
new file mode 100644
index 000000000..d11983a3f
--- /dev/null
+++ b/pcr/openrc-misc/sntp.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/sntp
+
+# Options to pass to sntp
+SNTP_OPTS="-s 0.gentoo.pool.ntp.org 1.gentoo.pool.ntp.org 2.gentoo.pool.ntp.org 3.gentoo.pool.ntp.org"
diff --git a/pcr/openrc-misc/sntp.rc b/pcr/openrc-misc/sntp.rc
new file mode 100644
index 000000000..cd42b4497
--- /dev/null
+++ b/pcr/openrc-misc/sntp.rc
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/sntp.rc,v 1.1 2013/07/06 07:15:02 pacho Exp $
+
+depend() {
+ before cron portmap
+ after net
+ use dns logger
+}
+
+checkconfig() {
+ if [ -z "${SNTP_OPTS}" ] ; then
+ eerror "Please edit /etc/conf.d/sntp"
+ eerror "I need to know what server/options to use!"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return $?
+
+ ebegin "Setting clock via SNTP"
+ /usr/bin/sntp ${SNTP_OPTS}
+ eend $? "Failed to set clock"
+}
diff --git a/pcr/openrc-misc/syndic-confd-1 b/pcr/openrc-misc/syndic-confd-1
new file mode 100644
index 000000000..d69d83fcd
--- /dev/null
+++ b/pcr/openrc-misc/syndic-confd-1
@@ -0,0 +1,5 @@
+# /etc/conf.d/salt-minion: config file for /etc/init.d/salt-minion
+
+# see man pages for salt-minion or run `salt-minion --help`
+# for valid cmdline options
+SALT_OPTS="--log-level=warning"
diff --git a/pcr/openrc-misc/syndic-initd-3 b/pcr/openrc-misc/syndic-initd-3
new file mode 100644
index 000000000..712432f90
--- /dev/null
+++ b/pcr/openrc-misc/syndic-initd-3
@@ -0,0 +1,14 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/salt/files/syndic-initd-3,v 1.1 2014/02/27 00:02:32 chutzpah Exp $
+
+command="/usr/bin/salt-syndic"
+command_args="${SALT_OPTS}"
+command_background="1"
+pidfile="/var/run/salt-syndic.pid"
+name="SALT syndic daemon"
+
+depend() {
+ use net logger
+}
diff --git a/pcr/openrc-misc/syslog-ng.confd b/pcr/openrc-misc/syslog-ng.confd
new file mode 100644
index 000000000..42fa26ab4
--- /dev/null
+++ b/pcr/openrc-misc/syslog-ng.confd
@@ -0,0 +1,42 @@
+# Config file for /etc/init.d/syslog-ng
+
+# If you are not using network logging, this entire section should be
+# commented out. Otherwise, choose one of the settings below based on
+# how you are configuring your network.
+#
+# If you are using the net.* scripts to configure your network, you should
+# set rc_need to match the interface through which your logging server
+# can be reached.
+#rc_need="net.eth0"
+#
+# If you are using an interface manager like wicd, dhcpcd in standalone
+# mode, networkmanager, etc to control your interfaces, set rc_need to
+# the name of that service.
+# rc_need="dhcpcd"
+#rc_need="networkmanager"
+#
+# If you are using newnet and configuring your interface statically with
+# the network script, you should use this setting.
+#rc_need="network"
+#
+# You can use this setting, but I do not recommend relying on it.
+#rc_need="net"
+#
+# You may also want to uncomment the following if you are using network
+# logging.
+#rc_use="stunnel"
+
+# For very customized setups these variables can be adjusted as needed
+# but for most situations they should remain commented:
+# SYSLOG_NG_CONFIGFILE=/etc/syslog-ng/syslog-ng.conf
+# SYSLOG_NG_STATEFILE_DIR=/var/lib/syslog-ng
+# SYSLOG_NG_STATEFILE=${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.persist
+# SYSLOG_NG_PIDFILE_DIR=/run
+# SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE_DIR}/syslog-ng.pid
+# SYSLOG_NG_GROUP=root
+# SYSLOG_NG_USER=root
+
+# Put any additional options for syslog-ng here.
+# See syslog-ng(8) for more information.
+
+SYSLOG_NG_OPTS=""
diff --git a/pcr/openrc-misc/syslog-ng.install b/pcr/openrc-misc/syslog-ng.install
new file mode 100644
index 000000000..898590a11
--- /dev/null
+++ b/pcr/openrc-misc/syslog-ng.install
@@ -0,0 +1,15 @@
+_svc="syslog-ng"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/syslog-ng.rc6 b/pcr/openrc-misc/syslog-ng.rc6
new file mode 100644
index 000000000..75e558be7
--- /dev/null
+++ b/pcr/openrc-misc/syslog-ng.rc6
@@ -0,0 +1,59 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/syslog-ng/files/3.6/syslog-ng.rc6,v 1.3 2015/03/29 07:27:06 mr_bones_ Exp $
+
+SYSLOG_NG_CONFIGFILE=${SYSLOG_NG_CONFIGFILE:-/etc/syslog-ng/${RC_SVCNAME}.conf}
+SYSLOG_NG_STATEFILE_DIR=${SYSLOG_NG_STATEFILE_DIR:-/var/lib/syslog-ng}
+SYSLOG_NG_STATEFILE=${SYSLOG_NG_STATEFILE:-${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.persist}
+SYSLOG_NG_PIDFILE_DIR=${SYSLOG_NG_PIDFILE_DIR:-/run}
+SYSLOG_NG_PIDFILE=${SYSLOG_NG_PIDFILE:-${SYSLOG_NG_PIDFILE_DIR}/${RC_SVCNAME}.pid}
+
+SYSLOG_NG_GROUP=${SYSLOG_NG_GROUP:-root}
+SYSLOG_NG_USER=${SYSLOG_NG_USER:-root}
+
+command="/usr/sbin/syslog-ng"
+command_args="--persist-file \"${SYSLOG_NG_STATEFILE}\" --cfgfile \"${SYSLOG_NG_CONFIGFILE}\" --pidfile \"${SYSLOG_NG_PIDFILE}\" ${SYSLOG_NG_OPTS}"
+extra_commands="checkconfig"
+extra_started_commands="reload"
+pidfile="${SYSLOG_NG_PIDFILE}"
+start_stop_daemon_args="--user \"${SYSLOG_NG_USER}\":\"${SYSLOG_NG_GROUP}\""
+description="Syslog-ng is a syslog replacement with advanced filtering features."
+description_checkconfig="Check the configuration file that will be used by \"start\""
+description_reload="Reload the configuration without exiting"
+required_files="${SYSLOG_NG_CONFIGFILE}"
+required_dirs="${SYSLOG_NG_PIDFILE_DIR}"
+
+depend() {
+ use clock
+ need hostname localmount
+ after bootmisc
+ provide logger
+}
+
+checkconfig() {
+ ebegin "Checking your configfile (${SYSLOG_NG_CONFIGFILE})"
+ syslog-ng -s -f "${SYSLOG_NG_CONFIGFILE}"
+ eend $? "Configuration error. Please fix your configfile (${SYSLOG_NG_CONFIGFILE})"
+}
+
+start_pre() {
+ checkconfig || return 1
+ checkpath \
+ -d \
+ --mode 0700 \
+ --owner "${SYSLOG_NG_USER}:${SYSLOG_NG_GROUP}" \
+ "${SYSLOG_NG_STATEFILE_DIR}"
+}
+
+stop_pre() {
+ [ "$RC_CMD" = restart ] && sleep 1
+ return 0
+}
+
+reload() {
+ checkconfig || return 1
+ ebegin "Reloading configuration and re-opening log files"
+ start-stop-daemon --signal HUP --pidfile "${pidfile}"
+ eend $?
+}
diff --git a/pcr/openrc-misc/thermald.initd b/pcr/openrc-misc/thermald.initd
new file mode 100644
index 000000000..9c629974b
--- /dev/null
+++ b/pcr/openrc-misc/thermald.initd
@@ -0,0 +1,7 @@
+#!/usr/bin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="/usr/bin/thermald"
+command_args="--dbus-enable"
+start_stop_daemon_args="--quiet"
diff --git a/pcr/openrc-misc/thermald.install b/pcr/openrc-misc/thermald.install
new file mode 100644
index 000000000..c64250b87
--- /dev/null
+++ b/pcr/openrc-misc/thermald.install
@@ -0,0 +1,16 @@
+_svc="thermald"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/virtualbox-guest-additions.install b/pcr/openrc-misc/virtualbox-guest-additions.install
new file mode 100644
index 000000000..50bd39276
--- /dev/null
+++ b/pcr/openrc-misc/virtualbox-guest-additions.install
@@ -0,0 +1,16 @@
+_svc="vboxservice"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/xe-daemon.initd b/pcr/openrc-misc/xe-daemon.initd
new file mode 100644
index 000000000..50519065f
--- /dev/null
+++ b/pcr/openrc-misc/xe-daemon.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/xe-guest-utilities/files/xe-daemon.initd,v 1.1 2014/06/23 14:30:35 robbat2 Exp $
+
+depend() {
+ need localmount
+ after bootmisc
+}
+
+start() {
+ einfo "Detecting Linux distribution version"
+ /usr/sbin/xe-linux-distribution /var/cache/xe-linux-distribution
+
+ ebegin "Starting xe daemon"
+ start-stop-daemon --start --exec /usr/sbin/xe-daemon \
+ --pidfile /var/run/xe-daemon.pid \
+ --background \
+ -- -p /var/run/xe-daemon.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping xe daemon"
+ start-stop-daemon --stop --exec /usr/sbin/xe-daemon \
+ --pidfile /var/run/xe-daemon.pid
+ eend $?
+}
diff --git a/pcr/openrc-misc/xe-guest-utilities.install b/pcr/openrc-misc/xe-guest-utilities.install
new file mode 100644
index 000000000..4e90f076b
--- /dev/null
+++ b/pcr/openrc-misc/xe-guest-utilities.install
@@ -0,0 +1,16 @@
+_svc='xe-daemon'
+_rlvl="boot"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-misc/zfs.initd b/pcr/openrc-misc/zfs.initd
new file mode 100644
index 000000000..a022ee9a5
--- /dev/null
+++ b/pcr/openrc-misc/zfs.initd
@@ -0,0 +1,124 @@
+#!/usr/bin/openrc-run
+# Copyright 1999-2011 Gentoo Foundation
+# Released under the 2-clause BSD license.
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/files/zfs,v 0.9 2011/04/30 10:13:43 devsk Exp $
+
+if [ -z "$init" ]; then
+ # Not interactive
+ grep -qE '(^|[^\\](\\\\)* )zfs=(off|no)( |$)' /proc/cmdline && exit 3
+fi
+
+depend()
+{
+ # Try to allow people to mix and match fstab with ZFS in a way that makes sense.
+ if [ "$(mountinfo -s /)" = 'zfs' ]
+ then
+ before localmount
+ else
+ after localmount
+ fi
+
+ # bootmisc will log to /var which may be a different zfs than root.
+ before bootmisc logger
+ use mtab
+ keyword -lxc -openvz -prefix -vserver
+}
+
+ZFS="/usr/bin/zfs"
+ZPOOL="/usr/bin/zpool"
+ZPOOL_CACHE="/etc/zfs/zpool.cache"
+ZFS_MODULE=zfs
+
+checksystem() {
+ if [ ! -c /dev/zfs ]; then
+ einfo "Checking if ZFS modules present"
+ if ! modinfo zfs > /dev/null 2>&1 ; then
+ eerror "$ZFS_MODULE not found. Is the ZFS package installed?"
+ return 1
+ fi
+ fi
+ einfo "Checking if zfs userspace tools present"
+ if [ ! -x $ZPOOL ]; then
+ eerror "$ZPOOL binary not found."
+ return 1
+ fi
+ if [ ! -x $ZFS ]; then
+ eerror "$ZFS binary not found."
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ ebegin "Starting ZFS"
+ checksystem || return 1
+
+ # Delay until all required block devices are present.
+ udevadm settle
+
+ if [ ! -c /dev/zfs ]; then
+ modprobe $ZFS_MODULE
+ rv=$?
+ if [ $rv -ne 0 ]; then
+ eerror "Failed to load the $ZFS_MODULE module, check 'dmesg|tail'."
+ eend $rv
+ return $rv
+ fi
+ fi
+
+ # Import all pools described by the cache file, and then mount
+ # all filesystem based on their properties.
+ if [ -f $ZPOOL_CACHE ]; then
+ einfo "Importing ZFS pools"
+ # as per fedora script, import can fail if all pools are already imported
+ # The check for $rv makes no sense...but someday, it will work right.
+ $ZPOOL import -c $ZPOOL_CACHE -aN 2>/dev/null || true
+ rv=$?
+ if [ $rv -ne 0 ]; then
+ eerror "Failed to import not-yet imported pools."
+ eend $rv
+ return $rv
+ fi
+ fi
+
+ einfo "Mounting ZFS filesystems"
+ $ZFS mount -a
+ rv=$?
+ if [ $rv -ne 0 ]; then
+ eerror "Failed to mount ZFS filesystems."
+ eend $rv
+ return $rv
+ fi
+
+ einfo "Exporting ZFS filesystems"
+ $ZFS share -a
+ rv=$?
+ if [ $rv -ne 0 ]; then
+ eerror "Failed to export ZFS filesystems."
+ eend $rv
+ return $rv
+ fi
+
+ eend 0
+ return 0
+}
+
+stop()
+{
+ ebegin "Unmounting ZFS filesystems"
+ $ZFS umount -a
+ rv=$?
+ if [ $rv -ne 0 ]; then
+ einfo "Some ZFS filesystems not unmounted"
+ fi
+
+ # Don't fail if we couldn't umount everything. /usr might be in use.
+ eend 0
+ return 0
+}
+
+status()
+{
+ # show pool status and list
+ $ZPOOL status && echo && $ZPOOL list
+}
diff --git a/pcr/openrc-misc/zfs.install b/pcr/openrc-misc/zfs.install
new file mode 100644
index 000000000..39f43b684
--- /dev/null
+++ b/pcr/openrc-misc/zfs.install
@@ -0,0 +1,16 @@
+_svc="zfs"
+_rlvl="boot"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}