summaryrefslogtreecommitdiff
path: root/pcr/openrc-net
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/openrc-net')
-rw-r--r--pcr/openrc-net/PKGBUILD753
-rw-r--r--pcr/openrc-net/apache.install16
-rw-r--r--pcr/openrc-net/autofs.install16
-rw-r--r--pcr/openrc-net/bind.install16
-rw-r--r--pcr/openrc-net/cyrus-sasl.install16
-rw-r--r--pcr/openrc-net/dhcp.install20
-rw-r--r--pcr/openrc-net/dhcpd.conf228
-rw-r--r--pcr/openrc-net/dhcpd.init5115
-rw-r--r--pcr/openrc-net/dhcrelay.conf16
-rw-r--r--pcr/openrc-net/dhcrelay.init334
-rw-r--r--pcr/openrc-net/dhcrelay6.conf8
-rw-r--r--pcr/openrc-net/hostapd-conf.d9
-rw-r--r--pcr/openrc-net/hostapd.install16
-rw-r--r--pcr/openrc-net/iptables.install16
-rw-r--r--pcr/openrc-net/krb5.install16
-rw-r--r--pcr/openrc-net/lighttpd.install21
-rw-r--r--pcr/openrc-net/named.confd-r748
-rw-r--r--pcr/openrc-net/named.init-r13248
-rw-r--r--pcr/openrc-net/nfs-utils.install22
-rw-r--r--pcr/openrc-net/nginx.install16
-rw-r--r--pcr/openrc-net/openldap.install16
-rw-r--r--pcr/openrc-net/openntpd.install16
-rw-r--r--pcr/openrc-net/openslp.install16
-rw-r--r--pcr/openrc-net/openssh.install16
-rw-r--r--pcr/openrc-net/openvpn.install16
-rw-r--r--pcr/openrc-net/polipo.install16
-rw-r--r--pcr/openrc-net/postfix.install16
-rw-r--r--pcr/openrc-net/privoxy.install16
-rw-r--r--pcr/openrc-net/quota-tools.install16
-rw-r--r--pcr/openrc-net/rpcbind.install16
-rw-r--r--pcr/openrc-net/rsync.install16
-rw-r--r--pcr/openrc-net/samba.install16
-rw-r--r--pcr/openrc-net/saslauthd2.rc721
-rw-r--r--pcr/openrc-net/squid.install16
-rw-r--r--pcr/openrc-net/syncthing.confd3
-rw-r--r--pcr/openrc-net/syncthing.initd22
-rw-r--r--pcr/openrc-net/syncthing.install16
-rw-r--r--pcr/openrc-net/tor.install16
-rw-r--r--pcr/openrc-net/transmission.install16
-rw-r--r--pcr/openrc-net/ufw.install16
-rw-r--r--pcr/openrc-net/vsftpd.install16
-rwxr-xr-xpcr/openrc-net/wicd.initd41
-rw-r--r--pcr/openrc-net/wicd.install20
-rw-r--r--pcr/openrc-net/xinetd.install16
-rw-r--r--pcr/openrc-net/ypbind-mt.install16
-rw-r--r--pcr/openrc-net/ypserv.install16
46 files changed, 1893 insertions, 0 deletions
diff --git a/pcr/openrc-net/PKGBUILD b/pcr/openrc-net/PKGBUILD
new file mode 100644
index 000000000..a0f5bf1a5
--- /dev/null
+++ b/pcr/openrc-net/PKGBUILD
@@ -0,0 +1,753 @@
+# Maintainer : freaj <freaj@riseup.net>
+# Maintainer (Manjaro): artoo <artoo@manjaro.org>
+
+# file vars for easy update
+_Cbind=named.confd-r7
+_Ibind=named.init-r13
+_Isasl=saslauthd2.rc7
+_Cdhcp1=dhcpd.conf2
+_Cdhcp2=dhcrelay.conf
+_Cdhcp3=dhcrelay6.conf
+_Idhcp1=dhcpd.init5
+_Idhcp2=dhcrelay.init3
+_Chost=hostapd-conf.d
+_Ihost=hostapd-init.d
+_Cip1=iptables-1.4.13.confd
+_Cip2=ip6tables-1.4.13.confd
+_Iip=iptables-1.4.13-r1.init
+_Ikrb1=mit-krb5kadmind.initd-r1
+_Ikrb2=mit-krb5kdc.initd-r1
+_Ikrb3=mit-krb5kpropd.initd-r1
+_Clight=lighttpd.confd
+_Ilight=lighttpd.initd
+_Cnfs=nfs.confd
+_Infs=nfs.initd
+_Cnfsc=nfsclient.confd
+_Infsc=nfsclient.initd
+_Iidmapd=rpc.idmapd.initd
+_Ipipefs=rpc.pipefs.initd
+_Igssd=rpc.gssd.initd
+_Isvcgssd=rpc.svcgssd.initd
+_Istatd=rpc.statd.initd
+_Cldap=slapd-confd-2.4.28-r1
+_Ildap=slapd-initd-2.4.28-r1
+_Islp=slpd-init
+_Cssh=sshd.confd
+_Issh=sshd.rc6.4
+_Ipolip=polipo.initd
+_Ipostfix=postfix.rc6.2.7
+_Ipriv=privoxy.initd
+_Cquota=quota.confd
+_Iquota1=quota.rc7
+_Iquota2=rpc.rquotad.initd
+#_Crpc=rpcbind.confd
+_Irpc=rpcbind.initd
+_Crsync=rsyncd.conf.d
+_Irsync=rsyncd.init.d-r1
+_Csmb=samba4.confd
+_Ismb=samba4.initd-r1
+_Csquid=squid.confd-r1
+_Isquid=squid.initd-r4
+_Ctrans=transmission-daemon.confd.4
+_Itrans=transmission-daemon.initd.9
+_Cufw=ufw.confd
+_Iufw=ufw-2.initd
+_Ivsftp=vsftpd.init
+_Svsftp=vsftpd-checkconfig.sh
+_Cxinet=xinetd.confd
+_Ixinet=xinetd.rc6
+_Cypbind=ypbind.confd-r1
+_Iypbind=ypbind.initd
+_Cypserv1=ypserv.confd
+_Cypserv2=rpc.yppasswdd.confd
+_Cypserv3=rpc.ypxfrd.confd
+_Iypserv1=ypserv
+_Iypserv2=rpc.yppasswdd-r1
+_Iypserv3=rpc.ypxfrd-2.23
+_Iautofs=autofs5.initd
+_Cvpn=openvpn-2.1.conf
+_Ivpn=openvpn-2.1.init
+_Cntp=openntpd.conf.d-20080406-r6
+_Intp=openntpd.init.d-20080406-r6
+_Ctor=tor.confd
+_Itor=tor.initd-r6
+_Iwicd=wicd.initd
+_CSync=syncthing.confd
+_ISync=syncthing.initd
+_Inginx=nginx.initd-r2
+
+_apver=2.4.10-r1
+_aprel=20140731
+
+_dev_uri="http://dev.gentoo.org/~polynomial-c/dist/apache"
+_gentoo_uri="http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86"
+
+pkgbase=openrc-net
+pkgname=('autofs-openrc'
+ 'apache-openrc'
+ 'bind-openrc'
+ 'cyrus-sasl-openrc'
+ 'dhcp-openrc'
+ 'hostapd-openrc'
+ 'iptables-openrc'
+ 'krb5-openrc'
+ 'lighttpd-openrc'
+ 'nfs-utils-openrc'
+ 'openldap-openrc'
+ 'openslp-openrc'
+ 'openssh-openrc'
+ 'openntpd-openrc'
+ 'openvpn-openrc'
+ 'polipo-openrc'
+ 'postfix-openrc'
+ 'privoxy-openrc'
+ 'quota-tools-openrc'
+ 'rpcbind-openrc'
+ 'rsync-openrc'
+ 'samba-openrc'
+ 'squid-openrc'
+ 'transmission-openrc'
+ 'ufw-openrc'
+ 'vsftpd-openrc'
+ 'xinetd-openrc'
+ 'ypbind-mt-openrc'
+ 'ypserv-openrc'
+ 'tor-openrc'
+ 'wicd-openrc'
+ 'syncthing-openrc'
+ 'nginx-openrc')
+pkgver=20150119
+pkgrel=1
+pkgdesc="OpenRC init scripts"
+arch=('any')
+url="https://github.com/manjaro/packages-openrc"
+license=('GPL2')
+groups=('openrc' 'openrc-net')
+conflicts=('openrc'
+ 'openrc-git'
+ 'openrc-arch-services-git'
+ 'initscripts'
+ 'systemd-sysvcompat')
+source=("${_dev_uri}/gentoo-apache-${_apver}-${_aprel}.tar.bz2"
+ "${_gentoo_uri}/net-dns/bind/files/${_Cbind}"
+ "${_gentoo_uri}/net-dns/bind/files/${_Ibind}"
+ "${_gentoo_uri}/dev-libs/cyrus-sasl/files/${_Isasl}"
+ "${_gentoo_uri}/net-misc/dhcp/files/${_Cdhcp1}"
+ "${_gentoo_uri}/net-misc/dhcp/files/${_Cdhcp2}"
+ "${_gentoo_uri}/net-misc/dhcp/files/${_Cdhcp3}"
+ "${_gentoo_uri}/net-misc/dhcp/files/${_Idhcp1}"
+ "${_gentoo_uri}/net-misc/dhcp/files/${_Idhcp2}"
+ "${_gentoo_uri}/net-wireless/hostapd/files/${_Chost}"
+ "${_gentoo_uri}/net-wireless/hostapd/files/${_Ihost}"
+ "${_gentoo_uri}/net-firewall/iptables/files/${_Cip1}"
+ "${_gentoo_uri}/net-firewall/iptables/files/${_Cip2}"
+ "${_gentoo_uri}/net-firewall/iptables/files/${_Iip}"
+ "${_gentoo_uri}/app-crypt/mit-krb5/files/${_Ikrb1}"
+ "${_gentoo_uri}/app-crypt/mit-krb5/files/${_Ikrb2}"
+ "${_gentoo_uri}/app-crypt/mit-krb5/files/${_Ikrb3}"
+ "${_gentoo_uri}/www-servers/lighttpd/files/${_Clight}"
+ "${_gentoo_uri}/www-servers/lighttpd/files/${_Ilight}"
+ "${_gentoo_uri}/net-fs/nfs-utils/files/${_Cnfs}"
+ "${_gentoo_uri}/net-fs/nfs-utils/files/${_Infs}"
+ "${_gentoo_uri}/net-fs/nfs-utils/files/${_Cnfsc}"
+ "${_gentoo_uri}/net-fs/nfs-utils/files/${_Infsc}"
+ "${_gentoo_uri}/net-fs/nfs-utils/files/${_Iidmapd}"
+ "${_gentoo_uri}/net-fs/nfs-utils/files/${_Ipipefs}"
+ "${_gentoo_uri}/net-fs/nfs-utils/files/${_Igssd}"
+ "${_gentoo_uri}/net-fs/nfs-utils/files/${_Isvcgssd}"
+ "${_gentoo_uri}/net-fs/nfs-utils/files/${_Istatd}"
+ "${_gentoo_uri}/net-nds/openldap/files/${_Cldap}"
+ "${_gentoo_uri}/net-nds/openldap/files/${_Ildap}"
+ "${_gentoo_uri}/net-libs/openslp/files/${_Islp}"
+ "${_gentoo_uri}/net-misc/openssh/files/${_Cssh}"
+ "${_gentoo_uri}/net-misc/openssh/files/${_Issh}"
+ "${_gentoo_uri}/net-proxy/polipo/files/${_Ipolip}"
+ "${_gentoo_uri}/mail-mta/postfix/files/${_Ipostfix}"
+ "${_gentoo_uri}/net-proxy/privoxy/files/${_Ipriv}"
+ "${_gentoo_uri}/sys-fs/quota/files/${_Cquota}"
+ "${_gentoo_uri}/sys-fs/quota/files/${_Iquota1}"
+ "${_gentoo_uri}/sys-fs/quota/files/${_Iquota2}"
+ #"${_gentoo_uri}/net-nds/rpcbind/files/${_Crpc}"
+ "${_gentoo_uri}/net-nds/rpcbind/files/${_Irpc}"
+ "${_gentoo_uri}/net-misc/rsync/files/${_Crsync}"
+ "${_gentoo_uri}/net-misc/rsync/files/${_Irsync}"
+ "${_gentoo_uri}/net-fs/samba/files/4.1/${_Csmb}"
+ "${_gentoo_uri}/net-fs/samba/files/4.1/${_Ismb}"
+ "${_gentoo_uri}/net-proxy/squid/files/${_Csquid}"
+ "${_gentoo_uri}/net-proxy/squid/files/${_Isquid}"
+ "${_gentoo_uri}/net-p2p/transmission/files/${_Ctrans}"
+ "${_gentoo_uri}/net-p2p/transmission/files/${_Itrans}"
+ "${_gentoo_uri}/net-firewall/ufw/files/${_Cufw}"
+ "${_gentoo_uri}/net-firewall/ufw/files/${_Iufw}"
+ "${_gentoo_uri}/net-ftp/vsftpd/files/${_Svsftp}"
+ "${_gentoo_uri}/net-ftp/vsftpd/files/${_Ivsftp}"
+ "${_gentoo_uri}/sys-apps/xinetd/files/${_Cxinet}"
+ "${_gentoo_uri}/sys-apps/xinetd/files/${_Ixinet}"
+ "${_gentoo_uri}/net-nds/ypbind/files/${_Cypbind}"
+ "${_gentoo_uri}/net-nds/ypbind/files/${_Iypbind}"
+ "${_gentoo_uri}/net-nds/ypserv/files/${_Cypserv1}"
+ "${_gentoo_uri}/net-nds/ypserv/files/${_Cypserv2}"
+ "${_gentoo_uri}/net-nds/ypserv/files/${_Cypserv3}"
+ "${_gentoo_uri}/net-nds/ypserv/files/${_Iypserv1}"
+ "${_gentoo_uri}/net-nds/ypserv/files/${_Iypserv2}"
+ "${_gentoo_uri}/net-nds/ypserv/files/${_Iypserv3}"
+ "${_gentoo_uri}/net-fs/autofs/files/${_Iautofs}"
+ "${_gentoo_uri}/net-misc/openvpn/files/${_Cvpn}"
+ "${_gentoo_uri}/net-misc/openvpn/files/${_Ivpn}"
+ "${_gentoo_uri}/net-misc/openntpd/files/${_Cntp}"
+ "${_gentoo_uri}/net-misc/openntpd/files/${_Intp}"
+ #"${_gentoo_uri}/net-misc/wicd/files/${_Iwicd}"
+ "${_gentoo_uri}/net-misc/tor/files/${_Ctor}"
+ "${_gentoo_uri}/net-misc/tor/files/${_Itor}"
+ "${_Iwicd}"
+ "${_CSync}"
+ "${_ISync}"
+ "${_gentoo_uri}/www-servers/nginx/files/${_Inginx}")
+
+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' 's|/sbin|/usr/bin|g')
+
+package_apache-openrc() {
+ pkgdesc="OpenRC apache init script"
+ depends=('openrc-core' 'apache')
+ backup=('etc/conf.d/httpd')
+ install=apache.install
+
+ install -Dm755 "${srcdir}/gentoo-apache-${_apver}/init/apache2.confd" "${pkgdir}/etc/conf.d/httpd"
+ install -Dm755 "${srcdir}/gentoo-apache-${_apver}/init/apache2.initd" "${pkgdir}/etc/init.d/httpd"
+
+ local _p1='s|/usr/sbin/apache2|/usr/bin/apachectl|' \
+ _p2='s|/etc/apache2/httpd.conf|/etc/httpd/conf/httpd.conf|' \
+ _p3='s/! test -f/test -f/' \
+ _p4='s|/usr/lib/apache2|/usr/lib/httpd|' \
+ _p5='s|apache2.pid|httpd/httpd.pid|' \
+ _p6='s|apache2 >/dev/null|httpd >/dev/null|' \
+ _p7='s|apache2|httpd|g' \
+ _p8='s|/run/apache_ssl_mutex|/run/httpd|'
+ sed -e "${_shebang}" -e "${_p1}" -e "${_p2}" -e "${_p3}" \
+ -e "${_p4}" -e "${_p5}" -e "${_p6}" -e "${_p8}" -i "${pkgdir}/etc/init.d/httpd"
+ sed -e "${_p2}" -e "${_p4}" -e "${_p5}" -e "${_p7}" -i "${pkgdir}/etc/conf.d/httpd"
+}
+
+package_autofs-openrc() {
+ pkgdesc="OpenRC autofs init script"
+ depends=('openrc-core' 'autofs')
+ install=autofs.install
+
+ install -Dm755 "${srcdir}/${_Iautofs}" "${pkgdir}/etc/init.d/autofs"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/autofs"
+}
+
+package_bind-openrc() {
+ pkgdesc="OpenRC bind init script"
+ depends=('openrc-core' 'bind')
+ backup=('etc/conf.d/named')
+ install=bind.install
+
+ install -Dm755 "${srcdir}/${_Cbind}" "${pkgdir}/etc/conf.d/named"
+ install -Dm755 "${srcdir}/${_Ibind}" "${pkgdir}/etc/init.d/named"
+
+ local _p1='s|/etc/bind/named.conf|/etc/named.conf|g'
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -e "${_p1}" -i "${pkgdir}/etc/init.d/named"
+}
+
+package_cyrus-sasl-openrc() {
+ pkgdesc="OpenRC cyrus-sasl init script"
+ depends=('openrc-core' 'cyrus-sasl')
+ install=cyrus-sasl.install
+
+ install -Dm755 "${srcdir}/${_Isasl}" "${pkgdir}/etc/init.d/saslauthd"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -i "${pkgdir}/etc/init.d/saslauthd"
+}
+
+package_dhcp-openrc() {
+ pkgdesc="OpenRC dhcp init script"
+ depends=('openrc-core' 'dhcp')
+ optdepends=('openldap-openrc: openldap initscript'
+ 'bind-openrc: bind initscript')
+ backup=('etc/conf.d/dhcpd'
+ 'etc/conf.d/dhcrelay'
+ 'etc/conf.d/dhcrelay6')
+ install=dhcp.install
+
+ install -Dm755 "${srcdir}/${_Cdhcp1}" "${pkgdir}/etc/conf.d/dhcpd"
+ install -Dm755 "${srcdir}/${_Cdhcp2}" "${pkgdir}/etc/conf.d/dhcrelay"
+ install -Dm755 "${srcdir}/${_Cdhcp3}" "${pkgdir}/etc/conf.d/dhcrelay6"
+
+ install -Dm755 "${srcdir}/${_Idhcp1}" "${pkgdir}/etc/init.d/dhcpd"
+ install -Dm755 "${srcdir}/${_Idhcp2}" "${pkgdir}/etc/init.d/dhcrelay"
+ install -Dm755 "${srcdir}/${_Idhcp2}" "${pkgdir}/etc/init.d/dhcrelay6"
+
+ local _p1='s|#@slapd@|ldap slapd|'
+ for f in ${pkgdir}/etc/init.d/*;do
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -e "${_p1}" -i $f
+ done
+}
+
+package_hostapd-openrc() {
+ pkgdesc="OpenRC hostapd init script"
+ depends=('openrc-core' 'hostapd')
+ backup=('etc/conf.d/hostapd')
+ install=hostapd.install
+
+ install -Dm755 "${srcdir}/${_Chost}" "${pkgdir}/etc/conf.d/hostapd"
+ install -Dm755 "${srcdir}/${_Ihost}" "${pkgdir}/etc/init.d/hostapd"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/hostapd"
+}
+
+package_iptables-openrc() {
+ pkgdesc="OpenRC iptables init script"
+ depends=('openrc-core' 'iptables')
+ backup=('etc/conf.d/iptables'
+ 'etc/conf.d/ip6tables')
+ install=iptables.install
+
+ install -Dm755 "${srcdir}/${_Cip1}" "${pkgdir}/etc/conf.d/iptables"
+ install -Dm755 "${srcdir}/${_Iip}" "${pkgdir}/etc/init.d/iptables"
+ install -Dm755 "${srcdir}/${_Cip2}" "${pkgdir}/etc/conf.d/ip6tables"
+ install -Dm755 "${srcdir}/${_Iip}" "${pkgdir}/etc/init.d/ip6tables"
+
+ for f in ${pkgdir}/etc/init.d/*;do
+ sed -e "${_shebang}" -e "${_binpath[1]}" -e "${_runpath}" -i $f
+ done
+}
+
+package_krb5-openrc() {
+ pkgdesc="OpenRC krb5 init script"
+ depends=('openrc-core' 'krb5')
+ install=krb5.install
+
+ install -Dm755 "${srcdir}/${_Ikrb1}" "${pkgdir}/etc/init.d/krb5kadmind"
+ install -Dm755 "${srcdir}/${_Ikrb2}" "${pkgdir}/etc/init.d/krb5kdc"
+ install -Dm755 "${srcdir}/${_Ikrb3}" "${pkgdir}/etc/init.d/krb5kpropd"
+
+ local _p1='s|mit-krb5kdc|krb5kdc|g' \
+ _p2='s|mit-krb5kadmind|krb5kadmind|g'
+ for f in ${pkgdir}/etc/init.d/*;do
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -e "${_p1}" -e "${_p2}" -i $f
+ done
+}
+
+package_lighttpd-openrc() {
+ pkgdesc="OpenRC lighttpd init script"
+ depends=('openrc-core' 'lighttpd')
+ backup=('etc/conf.d/lighttpd')
+ install=lighttpd.install
+
+ install -Dm755 "${srcdir}/${_Clight}" "${pkgdir}/etc/conf.d/lighttpd"
+ install -Dm755 "${srcdir}/${_Ilight}" "${pkgdir}/etc/init.d/lighttpd"
+ local _p1='s/lighttpd:lighttpd/http:http/'
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -e ${_p1} -i "${pkgdir}/etc/init.d/lighttpd"
+}
+
+package_rpcbind-openrc() {
+ pkgdesc="OpenRC rpcbind init script"
+ depends=('openrc-core' 'rpcbind')
+ #backup=('etc/conf.d/rpcbind')
+ install=rpcbind.install
+
+ #install -Dm755 "${srcdir}/${_Crpc}" "${pkgdir}/etc/conf.d/rpcbind"
+ local _p1='s|RPCBIND_OPTS|RPCBIND_ARGS|'
+
+ install -Dm755 "${srcdir}/${_Irpc}" "${pkgdir}/etc/init.d/rpcbind"
+
+ sed -e "${_shebang}" -e "${_binpath[1]}" -e "${_runpath}" -e "${_p1}" -i "${pkgdir}/etc/init.d/rpcbind"
+}
+
+package_nfs-utils-openrc() {
+ pkgdesc="OpenRC nfs-utils init script"
+ depends=('nfs-utils' 'rpcbind-openrc' 'device-mapper-openrc')
+ optdepends=('ypbind-openrc: ypbind initscript'
+ 'quota-tools-openrc: quota-tools initscript'
+ 'bind-openrc: bind initscript')
+ backup=('etc/conf.d/nfs'
+ 'etc/conf.d/nfsclient')
+ install=nfs-utils.install
+
+ install -Dm755 "${srcdir}/${_Cnfs}" "${pkgdir}/etc/conf.d/nfs"
+ install -Dm755 "${srcdir}/${_Infs}" "${pkgdir}/etc/init.d/nfs"
+
+ install -Dm755 "${srcdir}/${_Cnfsc}" "${pkgdir}/etc/conf.d/nfsclient"
+ install -Dm755 "${srcdir}/${_Infsc}" "${pkgdir}/etc/init.d/nfsclient"
+
+ install -Dm755 "${srcdir}/${_Igssd}" "${pkgdir}/etc/init.d/rpc.gssd"
+ install -Dm755 "${srcdir}/${_Iidmapd}" "${pkgdir}/etc/init.d/rpc.idmapd"
+ install -Dm755 "${srcdir}/${_Ipipefs}" "${pkgdir}/etc/init.d/rpc.pipefs"
+ install -Dm755 "${srcdir}/${_Istatd}" "${pkgdir}/etc/init.d/rpc.statd"
+ install -Dm755 "${srcdir}/${_Isvcgssd}" "${pkgdir}/etc/init.d/rpc.svcgssd"
+
+ for f in ${pkgdir}/etc/init.d/*;do
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i $f
+ done
+}
+
+package_openntpd-openrc() {
+ pkgdesc="OpenRC openntpd init script"
+ depends=('openrc-core' 'openntpd')
+ groups=('openrc-net')
+ provides=('openrc-timed')
+ conflicts=('ntp'
+ 'ntp-openrc'
+ 'openrc'
+ 'openrc-git'
+ 'openrc-arch-services-git'
+ 'initscripts'
+ 'systemd-sysvcompat')
+ backup=('etc/conf.d/ntpd')
+ install=openntpd.install
+
+ install -Dm755 "${srcdir}/${_Cntp}" "${pkgdir}/etc/conf.d/ntpd"
+ install -Dm755 "${srcdir}/${_Intp}" "${pkgdir}/etc/init.d/ntpd"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/ntpd"
+}
+
+package_openldap-openrc() {
+ pkgdesc="OpenRC openldap init script"
+ depends=('openrc-core' 'openldap')
+ backup=('etc/conf.d/slapd')
+ install=openldap.install
+
+ install -Dm755 "${srcdir}/${_Cldap}" "${pkgdir}/etc/conf.d/slapd"
+ install -Dm755 "${srcdir}/${_Ildap}" "${pkgdir}/etc/init.d/slapd"
+
+ local _p1='s|/usr/lib/openldap/slapd|/usr/lib/slapd|g'
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -e "${_p1}" -i "${pkgdir}/etc/init.d/slapd"
+}
+
+package_openslp-openrc() {
+ pkgdesc="OpenRC openslp init script"
+ depends=('openrc-core' 'openslp')
+ install=openslp.install
+
+ install -Dm755 "${srcdir}/${_Islp}" "${pkgdir}/etc/init.d/slpd"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/slpd"
+}
+
+package_openssh-openrc() {
+ pkgdesc="OpenRC openssh init script"
+ depends=('openrc-core' 'openssh')
+ optdepends=('bind-openrc: bind initscript')
+ backup=('etc/conf.d/sshd')
+ install=openssh.install
+
+ install -Dm755 "${srcdir}/${_Cssh}" "${pkgdir}/etc/conf.d/sshd"
+ install -Dm755 "${srcdir}/${_Issh}" "${pkgdir}/etc/init.d/sshd"
+
+ sed -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/conf.d/sshd"
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/sshd"
+}
+
+package_openvpn-openrc() {
+ pkgdesc="OpenRC openvpn init script"
+ depends=('openrc-core' 'openvpn')
+ backup=('etc/conf.d/openvpn')
+ install=openvpn.install
+
+ install -Dm755 "${srcdir}/${_Cvpn}" "${pkgdir}/etc/conf.d/openvpn"
+ install -Dm755 "${srcdir}/${_Ivpn}" "${pkgdir}/etc/init.d/openvpn"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/openvpn"
+}
+
+package_polipo-openrc() {
+ pkgdesc="OpenRC polipo init script"
+ depends=('openrc-core' 'polipo')
+ install=polipo.install
+
+ install -Dm755 "${srcdir}/${_Ipolip}" "${pkgdir}/etc/init.d/polipo"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/polipo"
+}
+
+package_postfix-openrc() {
+ pkgdesc="OpenRC postfix init script"
+ depends=('openrc-core' 'postfix')
+ optdepends=('bind-openrc: bind initscript'
+ 'ypbind-openrc: ypbind initscript'
+ 'cyrus-sasl-openrc: cyrus-sasl initscript')
+ install=postfix.install
+
+ install -Dm755 "${srcdir}/${_Ipostfix}" "${pkgdir}/etc/init.d/postfix"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/postfix"
+}
+
+package_privoxy-openrc() {
+ pkgdesc="OpenRC privoxy init script"
+ depends=('openrc-core' 'privoxy')
+ install=privoxy.install
+
+ install -Dm755 "${srcdir}/${_Ipriv}" "${pkgdir}/etc/init.d/privoxy"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/privoxy"
+}
+
+package_quota-tools-openrc() {
+ pkgdesc="OpenRC quota-tools init script"
+ depends=('quota-tools' 'rpcbind-openrc')
+ optdepends=('ypbind-openrc: ypbind initscript')
+ backup=('etc/conf.d/quota')
+ install=quota-tools.install
+
+ install -Dm755 "${srcdir}/${_Cquota}" "${pkgdir}/etc/conf.d/quota"
+ install -Dm755 "${srcdir}/${_Iquota1}" "${pkgdir}/etc/init.d/quota"
+ install -Dm755 "${srcdir}/${_Iquota2}" "${pkgdir}/etc/init.d/rpc.rquotad"
+
+
+ for f in ${pkgdir}/etc/init.d/*;do
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i $f
+ done
+}
+
+package_rsync-openrc() {
+ pkgdesc="OpenRC rsync init script"
+ depends=('openrc-core' 'rsync')
+ backup=('etc/conf.d/rsyncd')
+ install=rsync.install
+
+ install -Dm755 "${srcdir}/${_Crsync}" "${pkgdir}/etc/conf.d/rsyncd"
+ install -Dm755 "${srcdir}/${_Irsync}" "${pkgdir}/etc/init.d/rsyncd"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/rsyncd"
+}
+
+package_samba-openrc() {
+ pkgdesc="OpenRC samba init script"
+ depends=('openrc-core' 'samba')
+ backup=('etc/conf.d/smb')
+ install=samba.install
+
+ install -Dm755 "${srcdir}/${_Csmb}" "${pkgdir}/etc/conf.d/smb"
+ install -Dm755 "${srcdir}/${_Ismb}" "${pkgdir}/etc/init.d/smb"
+
+ local _p1='s/="samba"/="smb"/'
+ sed -e "${_binpath[0]}" -e ${_p1} -i "${pkgdir}/etc/conf.d/smb"
+
+ _p1='s/##samba/##smb/'
+ local _p2='s|"samba"|"smb"|'
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -e ${_p1} -e ${_p2} -i "${pkgdir}/etc/init.d/smb"
+}
+
+package_squid-openrc() {
+ pkgdesc="OpenRC squid init script"
+ depends=('openrc-core' 'squid')
+ optdepends=('bind-openrc: bind initscript')
+ backup=('etc/conf.d/squid')
+ install=squid.install
+
+ install -Dm755 "${srcdir}/${_Csquid}" "${pkgdir}/etc/conf.d/squid"
+ install -Dm755 "${srcdir}/${_Isquid}" "${pkgdir}/etc/init.d/squid"
+
+ local _p1='s|chown squid|chown proxy|' \
+ _p2='s|squid:squid|proxy:proxy|'
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -e "${_p1}" -e "${_p2}" -i "${pkgdir}/etc/init.d/squid"
+}
+
+package_transmission-openrc() {
+ pkgdesc="OpenRC transmission init script"
+ depends=('openrc-core' 'transmission-cli')
+ backup=('etc/conf.d/transmission-daemon')
+ install=transmission.install
+
+ install -Dm755 "${srcdir}/${_Ctrans}" "${pkgdir}/etc/conf.d/transmission-daemon"
+ install -Dm755 "${srcdir}/${_Itrans}" "${pkgdir}/etc/init.d/transmission-daemon"
+
+ sed -e "${_shebang}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/transmission-daemon"
+}
+
+package_ufw-openrc() {
+ pkgdesc="OpenRC ufw init script"
+ depends=('openrc-core' 'ufw')
+ backup=('etc/conf.d/ufw')
+ install=ufw.install
+
+ install -Dm755 "${srcdir}/${_Cufw}" "${pkgdir}/etc/conf.d/ufw"
+ install -Dm755 "${srcdir}/${_Iufw}" "${pkgdir}/etc/init.d/ufw"
+
+ local _p1='s|/usr/share/ufw/ufw-init-functions|/usr/lib/ufw/ufw-init-functions|g'
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -e "${_p1}" -i "${pkgdir}/etc/init.d/ufw"
+}
+
+package_vsftpd-openrc() {
+ pkgdesc="OpenRC vsftpd init script"
+ depends=('openrc-core' 'vsftpd')
+ optdepends=('bind-openrc: bind initscript')
+ install=vsftpd.install
+
+ install -Dm755 "${srcdir}/${_Ivsftp}" "${pkgdir}/etc/init.d/vsftpd"
+ install -Dm755 "${srcdir}/${_Svsftp}" "${pkgdir}/usr/lib/vsftpd-checkconfig.sh"
+
+ local _p1='s|/usr/libexec/|/usr/lib/|g' \
+ _p2='s|/etc/vsftpd/|/etc/|g'
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -e "${_p1}" -e "${_p2}" -i "${pkgdir}/etc/init.d/vsftpd"
+ sed -e "${_p2}" -i "${pkgdir}/usr/lib/vsftpd-checkconfig.sh"
+}
+
+package_xinetd-openrc() {
+ pkgdesc="OpenRC xinetd init script"
+ depends=('openrc-core' 'xinetd')
+ backup=('etc/conf.d/xinetd')
+ install=xinetd.install
+
+ install -Dm755 "${srcdir}/${_Cxinet}" "${pkgdir}/etc/conf.d/xinetd"
+ install -Dm755 "${srcdir}/${_Ixinet}" "${pkgdir}/etc/init.d/xinetd"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/xinetd"
+}
+
+package_ypbind-mt-openrc() {
+ pkgdesc="OpenRC ypbind-mt init script"
+ depends=('ypbind-mt' 'rpcbind-openrc' 'openslp-openrc')
+ optdepends=('ypserv-openrc: ypserv initscript')
+ backup=('etc/conf.d/ypbind')
+ install=ypbind-mt.install
+
+ install -Dm755 "${srcdir}/${_Cypbind}" "${pkgdir}/etc/conf.d/ypbind"
+ install -Dm755 "${srcdir}/${_Iypbind}" "${pkgdir}/etc/init.d/ypbind"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/ypbind"
+}
+
+package_ypserv-openrc() {
+ pkgdesc="OpenRC ypserv init script"
+ depends=('openrc-core' 'ypserv')
+ backup=('etc/conf.d/rpc.yppasswdd'
+ 'etc/conf.d/rpc.ypxfrd'
+ 'etc/conf.d/ypserv')
+ install=ypserv.install
+
+ install -Dm755 "${srcdir}/${_Cypserv1}" "${pkgdir}/etc/init.d/ypserv"
+ install -Dm755 "${srcdir}/${_Iypserv1}" "${pkgdir}/etc/conf.d/ypserv"
+ install -Dm755 "${srcdir}/${_Cypserv2}" "${pkgdir}/etc/conf.d/rpc.yppasswdd"
+ install -Dm755 "${srcdir}/${_Iypserv2}" "${pkgdir}/etc/init.d/rpc.yppasswdd"
+ install -Dm755 "${srcdir}/${_Cypserv3}" "${pkgdir}/etc/conf.d/rpc.ypxfrd"
+ install -Dm755 "${srcdir}/${_Iypserv3}" "${pkgdir}/etc/init.d/rpc.ypxfrd"
+
+ for f in ${pkgdir}/etc/init.d/*;do
+ sed -e "${_shebang}" -e "${_binpath[0]}" -e "${_runpath}" -i $f
+ done
+}
+
+package_tor-openrc() {
+ pkgdesc="OpenRC tor init script"
+ depends=('openrc-core' 'tor')
+ backup=('etc/conf.d/tor')
+ install=tor.install
+
+ install -Dm755 "${srcdir}/${_Ctor}" "${pkgdir}/etc/conf.d/tor"
+ install -Dm755 "${srcdir}/${_Itor}" "${pkgdir}/etc/init.d/tor"
+
+ sed -e "${_shebang}" -e "${_runpath}" -i "${pkgdir}/etc/init.d/tor"
+}
+
+package_wicd-openrc() {
+ pkgdesc="OpenRC wicd script"
+ depends=('openrc-core' 'wicd')
+ install=wicd.install
+
+ install -Dm755 "${srcdir}/${_Iwicd}" "${pkgdir}/etc/init.d/wicd"
+}
+
+package_syncthing-openrc() {
+ pkgdesc="OpenRC syncthing init script"
+ depends=('openrc-core' 'syncthing')
+ backup=('etc/conf.d/syncthing')
+ install=syncthing.install
+
+ install -Dm755 "${srcdir}/${_CSync}" "${pkgdir}/etc/conf.d/syncthing"
+ install -Dm755 "${srcdir}/${_ISync}" "${pkgdir}/etc/init.d/syncthing"
+
+}
+
+package_nginx-openrc() {
+ pkgdesc="OpenRC nginx init script"
+ depends=('openrc-core' 'nginx')
+ install=nginx.install
+
+ install -Dm755 "${srcdir}/${_Inginx}" "${pkgdir}/etc/init.d/nginx"
+
+ sed -e "${_shebang}" -e "${_binpath[0]}" -i "${pkgdir}/etc/init.d/nginx"
+}
+sha256sums=('8e093a18582c3a20283ed1c09de9acc6832a80b1d5a02962599db0535d38af19'
+ '3cf1ab72446cb9417de916e4cd732f2056fb74d2c6f03da6741b7bae8c415448'
+ '55024fe0e2b491b5cb490a9f575bad3096d446f20f8d52778d778fd26a415d52'
+ 'a095def10c3b7e6894a6d782c70cbe176c7b53f36386dcc4b1e5bc75424e29f0'
+ 'e8a413e9102948b336f60041fc3cade33125faf56d8319ee65d9f3c63199a8e7'
+ 'a157630c3bdc9565cca8240ee1e6539fc9cbc1e4642c40e0965e3609d1021bac'
+ '099f668e1ad42ed9446b15675032a1186715d1fe9e4a1b24dfb787e68495d2b6'
+ '049a231908dc2c5f82446712d71d5e75d430bd043b53eead1529f2d81e1595ab'
+ '204aaf81d51dc119cee1d1ff3ae3dd50af666af2f8b2a363fd1bf442d4dcee00'
+ '916f4b14095ee4ec8a510391c883e9f01868e18d79a3d5cbeb13a104a793d45d'
+ 'b9701b9ea509638ee1ed74bec38a22e6bd7358763497ce53c146d2faf9e97a61'
+ '7e2341211ca14997b7a8a1f930f94db855291af597c568f680f80031c20d45b6'
+ '2938fe4206514d9868047bd8f888a699fa2097ca69edab176453436d4259abaa'
+ '13047698e03079b754957e1e548ce7505dfb2c73c9a31f87e061140603ab0e44'
+ '3e55c79f19aaa6ef6b64a621c03dbb2eac3ad923916dc803f4c1bfe48ce89fbb'
+ '709309dea043aa306c2fcf0960e0993a6db540c220de64cf92d6b85f1cca23c5'
+ 'c374ea05d7e9f15e10c8f9dbd0cad6548e0f92aef7de33e5dbc27222e9407e7b'
+ 'bb6e6721f33e6582a91025f3500e159a599fb856d699e9394093e1018c7925e0'
+ 'b1515472c32927039b38f6c3a797cbc54a5a300b5d6fa54df9550174afa2b7f8'
+ '22bba4ee5d58bae422650875c7c8a797a52fc121ddd02d48297c075b8a35401e'
+ '1e77bc6fb2ceb266f724818898bd42bec47512a5a7ede6660e0565ea1c58d619'
+ 'a1ecfb9441052d374b6bc2b77554a3253a4e4c231c76114b3313d2cc68e561b8'
+ '426996fc12758565d4c827762df76634f40cc8915988ab89ba5e81aeb561cf46'
+ '3ce65326859c43983dad25ad2d4731488c488037796e39b6b5eda336e8bf81ef'
+ 'ebee63e81fb952474c34b745913e8774b29c9cc65180d363a33d991e478aea2d'
+ '00d9c29280a83e8458c33139d04a9b38c6fdba9d7cb9b420ca83bf6b10e6435d'
+ 'f1c460d8b0e91e54a551397d755135d05a3728d81de596535bf8bda074455677'
+ '0c7bd35a14da6c0c2577f09ae82a41ddb693a88157eeaf80684616f79be6c304'
+ '5bca003ec3b67c7c78519aede1d82002579006ccfecce8f87b559df719f82e92'
+ '1fc515a6816b8a750db513df0b3b9bf8dd8bd4c4e9051205521acadfdebeae0f'
+ '7f228796e020c0779c52683f684197d50662ae890b1ae193ffa9acf157ccd143'
+ '29c6d57ac3ec6018cadc6ba6cd9b90c9ed46e20049b970fdcc68ee2481a2ee41'
+ '97221a017d8ee9de996277c5a794d973a0b5e8180c29c97b3652bd1984a7b5d0'
+ 'ff37dacce4551b6ef9866435d586b014aae5fef5b6c3ae7ba839165514644765'
+ '51f4bffa535d891f94d4a20ca2a4a42cc99189f3de78cee1c8d235e4a9d1721d'
+ '224496b498b4f692ae3316a95b5c7c8b6230dcd5fee0ca163956a7acde243de9'
+ '00d1dfb3b893db5d6a213a4edda622c7d64dcafa40b3019f15e070c164286632'
+ '00ce705b49aaa356d9d9f0be3b80a3fe2810471cbe02fd0edc66349f3ca281de'
+ 'c3896303d6cfebf314a3f6b8aeed0f6cb6ae421c4c0923b0121c76b3251314e5'
+ '6561ae40c5899a9f7a12f1f0867bec47d47c7cc3c583574ffcecbbf6f8d8afbb'
+ 'de758791b16b89a648c01867af7f51bc9bd44e40cbe868e439b753ff5d9572e5'
+ 'baff64277f9aa62cf1eeed2284bb08c4f3078a8e6e7604e4fec228ca5fa9dd82'
+ '53755809cc27fdbaf98752cd3da45b5c2bda62dd46fcc37570c6e237f7954ffa'
+ '9f4eaba0b966fd30351fa66cac9a666b5ec1dc54035ddad94c61a2f43dcb2d62'
+ '214a184495a3384eb452caef435256043bc51e35140a61b1f5fdff32603c8f7e'
+ '3830cb94600ac658a6ff1f9f31bdbece64caf3ad23c62ae0a887d152970125f5'
+ '249689688aad23d0d27ccdd08a0907fd85058d6a52ccd3467f756b07f5d059ee'
+ '06d047b47befe6aaf1b1542fdd50e84ea38e0fef004b5095f6096f33fa1901a3'
+ '069aa7382b40aecebf26ef53f3f4c49890314e0357925c84b3c15f1d0b913be0'
+ '657b5305923b2a5de9eb96931aaaa28d6e997ace6c40793d905887798094258c'
+ '2de7c7c1edfe3ae0480e22d988a564db3bb873050929ebb6e8361d7a1288ddda'
+ 'e6cf3df546aae57bb10e2b4282a9ccd79741473ef9dbdbd7628a16c84622da06'
+ 'e401e2cf7c0180a170d3dc3e91d7e98002bae7b013df72813b7bcf89b864fb3a'
+ '6aeb4ec9b8ccc062b5ee8c609830c05cee3ed790fa90d7b2d8cf82a09e317c5c'
+ '79f6c6ed4875f00fe702f69e9a6180a032d5a47f3e58e892e6ba0e2746b6fec8'
+ '3cdd6872fae15dc8533b3f75ac36ad59ffb946a3f1b445d688629c621cebbe34'
+ '4edd475ca95d31cfcea20a8e6268024f8128423bc7ae67edb535e6811c64668e'
+ 'e46afe737bfc57aa31be1a441615fcc112e1ebf41d631c1929e00b81baca119d'
+ 'bd1f245a362f85319e83965e8b825e66e686a4a0bf185ab8ec51fd335bc873c2'
+ '08db79845b497f2ec8938854ffac904aeed747d98c0820ad0be9e5aa9377512b'
+ 'e827778b8a8e6984b637c745c315a2e02ebc46af752651b7a70626ba545a84b6'
+ 'a6445dd607093fdafb013e5896f60d78223549b38c96300fe239bcf5dbf2a8de'
+ 'f2c44e5018719f644e194a4e8e43390bdc9926c533f79c41f0abf84879799d05'
+ '330149a83684ddabe413d134d4c8efad4c88b18c2ab67165014deff5f7fffad2'
+ 'd1b1f8a00935d77521bceb62535350444df3470fa45f4d33c3934051a1bb595b'
+ '91fb1497b3a6ef0bb3a3d5baefdff801d8ff1cba27aaf742303415550814a09b'
+ 'fca7183a7676f0f471878925c8fbec20b7a0bff01551c0ad2b34d4d8a826c876'
+ '41d780f291847e19f632428bbf27c3f289414afd237546d2974da1b75384c25c'
+ '49da1b5f267927023bc092adcf89d406ec294584039d6bca6b7aea0a9e7c4c4f'
+ '66b2b53b077ddc2d5eb1d81faa99fa0f4f0db01520900ba948001e539bfe02d8'
+ 'eb4a4315916fe3f8688c1da5bb5c249a1f402e61617452288d5b0668078c955c'
+ '63708b1a7b61ae791df64bb4cefa01dc12236f96bb67fe6d0b2c513e11c81f3e'
+ '9d5fca09d0161446a5cec30a0694cdc0656469403a008920a52a190051218b36')
diff --git a/pcr/openrc-net/apache.install b/pcr/openrc-net/apache.install
new file mode 100644
index 000000000..739378d9a
--- /dev/null
+++ b/pcr/openrc-net/apache.install
@@ -0,0 +1,16 @@
+_svc="httpd"
+_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-net/autofs.install b/pcr/openrc-net/autofs.install
new file mode 100644
index 000000000..9db9bcb9a
--- /dev/null
+++ b/pcr/openrc-net/autofs.install
@@ -0,0 +1,16 @@
+_svc="autofs"
+_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-net/bind.install b/pcr/openrc-net/bind.install
new file mode 100644
index 000000000..2b94c4d1d
--- /dev/null
+++ b/pcr/openrc-net/bind.install
@@ -0,0 +1,16 @@
+_svc="named"
+_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-net/cyrus-sasl.install b/pcr/openrc-net/cyrus-sasl.install
new file mode 100644
index 000000000..072a3f083
--- /dev/null
+++ b/pcr/openrc-net/cyrus-sasl.install
@@ -0,0 +1,16 @@
+_svc="saslauthd"
+_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-net/dhcp.install b/pcr/openrc-net/dhcp.install
new file mode 100644
index 000000000..eb1d9d96e
--- /dev/null
+++ b/pcr/openrc-net/dhcp.install
@@ -0,0 +1,20 @@
+_svc="dhcpd"
+_rlvl="default"
+
+post_install() {
+# _usr="dhcp"
+# _grp="dhcp"
+# echo " ==> requires $_usr user"
+# echo " ==> requires $_grp group"
+ _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-net/dhcpd.conf2 b/pcr/openrc-net/dhcpd.conf2
new file mode 100644
index 000000000..5cd2eeca3
--- /dev/null
+++ b/pcr/openrc-net/dhcpd.conf2
@@ -0,0 +1,28 @@
+# /etc/conf.d/dhcpd: config file for /etc/init.d/dhcpd
+
+# If you require more than one instance of dhcpd you can create symbolic
+# links to dhcpd service like so
+# cd /etc/init.d
+# ln -s dhcpd dhcpd.foo
+# cd ../conf.d
+# cp dhcpd dhcpd.foo
+# Now you can edit dhcpd.foo and specify a different configuration file.
+# You'll also need to specify a pidfile in that dhcpd.conf file.
+# See the pid-file-name option in the dhcpd.conf man page for details.
+
+# If you wish to run dhcpd in a chroot, uncomment the following line
+# DHCPD_CHROOT="/var/lib/dhcp/chroot"
+
+# All file paths below are relative to the chroot.
+# You can specify a different chroot directory but MAKE SURE it's empty.
+
+# Specify a configuration file - the default is /etc/dhcp/dhcpd.conf
+# DHCPD_CONF="/etc/dhcp/dhcpd.conf"
+
+# Configure which interface or interfaces to for dhcpd to listen on.
+# List all interfaces space separated. If this is not specified then
+# we listen on all interfaces.
+# DHCPD_IFACE=""
+
+# Insert any other dhcpd options - see the man page for a full list.
+# DHCPD_OPTS=""
diff --git a/pcr/openrc-net/dhcpd.init5 b/pcr/openrc-net/dhcpd.init5
new file mode 100644
index 000000000..65148e08d
--- /dev/null
+++ b/pcr/openrc-net/dhcpd.init5
@@ -0,0 +1,115 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcpd.init5,v 1.6 2015/02/10 00:27:08 polynomial-c Exp $
+
+extra_commands="configtest"
+
+: ${DHCPD_CONF:=/etc/dhcp/${SVCNAME}.conf}
+
+depend() {
+ need net
+ use logger dns #@slapd@
+}
+
+get_var() {
+ local var="$(sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' "${chroot}${DHCPD_CONF}")"
+ echo ${var:-$2}
+}
+
+checkconfig() {
+ set -- ${DHCPD_OPTS} ${chroot:+-chroot} ${chroot} -t
+
+ dhcpd "$@" 1>/dev/null 2>&1
+ local ret=$?
+ if [ ${ret} -ne 0 ] ; then
+ eerror "${SVCNAME} has detected a syntax error in your configuration files:"
+ dhcpd "$@"
+ fi
+
+ return ${ret}
+}
+
+configtest() {
+ local chroot=${DHCPD_CHROOT%/}
+
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+start() {
+ local chroot=${DHCPD_CHROOT%/}
+
+ # Work out our cffile if it's in our DHCPD_OPTS
+ case " ${DHCPD_OPTS} " in
+ *" -cf "*)
+ DHCPD_CONF=" ${DHCPD_OPTS} "
+ DHCPD_CONF="${DHCPD_CONF##* -cf }"
+ DHCPD_CONF="${DHCPD_CONF%% *}"
+ ;;
+ *) DHCPD_OPTS="${DHCPD_OPTS} -cf ${DHCPD_CONF}"
+ ;;
+ esac
+
+ if [ -n "${chroot}" ] ; then
+ # the config test want's these to exist
+ mkdir -p \
+ "${chroot}"/var/run/dhcp \
+ "${chroot}"/var/lib/dhcp \
+ "${chroot}"/etc/dhcp
+ fi
+
+ # see comment in get_var() above
+ if [ ! -f "${chroot}${DHCPD_CONF}" ] ; then
+ eerror "${chroot}${DHCPD_CONF} does not exist"
+ return 1
+ fi
+
+ checkconfig || return 1
+
+ checkpath -d -o dhcp:dhcp "${chroot}"/var/run/dhcp "${chroot}"/var/lib/dhcp
+
+ local leasefile="$(get_var lease-file-name /var/lib/dhcp/${SVCNAME}.leases)"
+ checkpath -f -o dhcp:dhcp "${chroot}${leasefile}"
+
+ # Setup LD_PRELOAD so name resolution works in our chroot.
+ if [ -n "${chroot}" ] ; then
+ checkpath -d -o root:root -m 755 "${chroot}"/dev "${chroot}"/etc "${chroot}"/proc
+ cp -pP /etc/localtime /etc/resolv.conf "${chroot}"/etc/
+ export LD_PRELOAD="${LD_PRELOAD} libresolv.so libnss_dns.so"
+ if ! mountinfo -q "${chroot}/proc" ; then
+ mount --bind /proc "${chroot}/proc"
+ fi
+ fi
+
+ local pidfile="$(get_var pid-file-name /var/run/dhcp/${SVCNAME}.pid)"
+
+ ebegin "Starting ${chroot:+chrooted }${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/dhcpd \
+ --pidfile "${chroot}/${pidfile}" \
+ -- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \
+ -user dhcp -group dhcp \
+ ${chroot:+-chroot} ${chroot} ${DHCPD_IFACE}
+ eend $? \
+ && save_options dhcpd_chroot "${chroot}" \
+ && save_options pidfile "${pidfile}"
+}
+
+stop() {
+ local chroot="$(get_options dhcpd_chroot)"
+ [ -z "$chroot" ] && chroot="$(get_options chroot)"
+
+ ebegin "Stopping ${chroot:+chrooted }${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/sbin/dhcpd \
+ --pidfile "${chroot}/$(get_options pidfile)"
+ res=$?
+
+ if [ ${res} -eq 0 ] && [ -n "${chroot}" ] ; then
+ if mountinfo -q "${chroot}/proc" ; then
+ umount "${chroot}/proc"
+ fi
+ fi
+
+ eend $res
+}
diff --git a/pcr/openrc-net/dhcrelay.conf b/pcr/openrc-net/dhcrelay.conf
new file mode 100644
index 000000000..44699682d
--- /dev/null
+++ b/pcr/openrc-net/dhcrelay.conf
@@ -0,0 +1,16 @@
+# /etc/conf.d/dhcrelay: config file for /etc/init.d/dhcrelay
+
+# Configure which interface or interfaces to for dhcrelay to listen on
+# and send to.
+# List all interfaces space separated. If this is not specified then
+# we use all interfaces.
+#IFACE=""
+# If you have split net interfaces, you might want to depend on them
+# explicitly here.
+#rc_need=$(printf 'net.%s ' ${IFACE})
+
+# Insert any other options needed. See dhcrelay(8) for details.
+#DHCRELAY_OPTS=""
+
+# Space separated list of IPs to forward BOOTP/DHCP packets to.
+DHCRELAY_SERVERS=""
diff --git a/pcr/openrc-net/dhcrelay.init3 b/pcr/openrc-net/dhcrelay.init3
new file mode 100644
index 000000000..fe4ec8c6d
--- /dev/null
+++ b/pcr/openrc-net/dhcrelay.init3
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/files/dhcrelay.init3,v 1.3 2012/11/11 21:42:02 vapier Exp $
+
+depend() {
+ need net
+ use logger #@slapd@
+}
+
+start() {
+ if [ -z "${DHCRELAY_SERVERS}" ] ; then
+ eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/${SVCNAME}"
+ return 1
+ fi
+
+ checkpath -d /var/run/dhcp
+
+ local iface_opts
+ if [ -n "${IFACE}" ] ; then
+ iface_opts=$(printf -- '-i %s ' ${IFACE})
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/dhcrelay \
+ -- -q ${iface_opts} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --pidfile /var/run/dhcp/${SVCNAME}.pid
+ eend $?
+}
diff --git a/pcr/openrc-net/dhcrelay6.conf b/pcr/openrc-net/dhcrelay6.conf
new file mode 100644
index 000000000..4e8b8c6fe
--- /dev/null
+++ b/pcr/openrc-net/dhcrelay6.conf
@@ -0,0 +1,8 @@
+# /etc/conf.d/dhcrelay6: config file for /etc/init.d/dhcrelay6
+
+# Insert any other options needed. See dhcrelay(8) for details.
+# Make sure you specify the lower (-l)/upper (-u) interfaces.
+DHCRELAY_OPTS="-6 -l lower-iface -u upper-iface"
+
+# Space separated list of IPs to forward BOOTP/DHCP packets to.
+DHCRELAY_SERVERS=""
diff --git a/pcr/openrc-net/hostapd-conf.d b/pcr/openrc-net/hostapd-conf.d
new file mode 100644
index 000000000..7d05735eb
--- /dev/null
+++ b/pcr/openrc-net/hostapd-conf.d
@@ -0,0 +1,9 @@
+# Space separated List of interfaces which needs to be started before
+# hostapd
+INTERFACES="wlan0"
+
+# Space separated list of configuration files
+CONFIGS="/etc/hostapd/hostapd.conf"
+
+# Extra options to pass to hostapd, see hostapd(8)
+OPTIONS=""
diff --git a/pcr/openrc-net/hostapd.install b/pcr/openrc-net/hostapd.install
new file mode 100644
index 000000000..79ac556fd
--- /dev/null
+++ b/pcr/openrc-net/hostapd.install
@@ -0,0 +1,16 @@
+_svc="hostapd"
+_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-net/iptables.install b/pcr/openrc-net/iptables.install
new file mode 100644
index 000000000..3e5c71894
--- /dev/null
+++ b/pcr/openrc-net/iptables.install
@@ -0,0 +1,16 @@
+_svc="iptables"
+_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-net/krb5.install b/pcr/openrc-net/krb5.install
new file mode 100644
index 000000000..d473af892
--- /dev/null
+++ b/pcr/openrc-net/krb5.install
@@ -0,0 +1,16 @@
+_svc="krb5kpropd"
+_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-net/lighttpd.install b/pcr/openrc-net/lighttpd.install
new file mode 100644
index 000000000..60b2c5688
--- /dev/null
+++ b/pcr/openrc-net/lighttpd.install
@@ -0,0 +1,21 @@
+_svc="lighttpd"
+_rlvl="default"
+
+post_install() {
+# conf1='server.pid-file = "/run/lighttpd.pid"'
+# conf2='server.bind = "localhost"'
+# file="/etc/lighttpd/lighttpd.conf"
+# echo " ==> $file requires $conf1"
+# echo " ==> $file requires $conf2(or any binding interface)"
+ _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-net/named.confd-r7 b/pcr/openrc-net/named.confd-r7
new file mode 100644
index 000000000..477a48061
--- /dev/null
+++ b/pcr/openrc-net/named.confd-r7
@@ -0,0 +1,48 @@
+# Set various named options here.
+#
+#OPTIONS=""
+
+# Set this to the number of processors you want bind to use.
+# Leave this unchanged if you want bind to automatically detect the number
+#CPU="1"
+
+# If you wish to run bind in a chroot:
+# 1) un-comment the CHROOT= assignment, below. You may use
+# a different chroot directory but MAKE SURE it's empty.
+# 2) run: emerge --config =<bind-version>
+#
+#CHROOT="/chroot/dns"
+
+# Uncomment to enable binmount of /usr/share/GeoIP
+#CHROOT_GEOIP="1"
+
+# Uncomment the line below to avoid that the init script mounts the needed paths
+# into the chroot directory.
+# You have to copy all needed config files by hand if you say CHROOT_NOMOUNT="1".
+#CHROOT_NOMOUNT="1"
+
+# Uncomment this option if you have setup your own chroot environment and you
+# don't want/need the chroot consistency check
+#CHROOT_NOCHECK=1
+
+# Default pid file location
+PIDFILE="${CHROOT}/run/named/named.pid"
+
+# Scheduling priority: 19 is the lowest and -20 is the highest.
+# Default: 0
+#NAMED_NICELEVEL="0"
+
+# Uncomment rc_named_use/rc_named_after for the database you need.
+# Its necessary to ensure the database backend will be started before named.
+
+# MySQL
+#rc_named_use="mysql"
+#rc_named_after="mysql"
+
+# PostgreSQL
+#rc_named_use="pg_autovacuum postgresql"
+#rc_named_after="pg_autovacuum postgresql"
+
+# LDAP
+#rc_named_use="ldap"
+#rc_named_after="ldap"
diff --git a/pcr/openrc-net/named.init-r13 b/pcr/openrc-net/named.init-r13
new file mode 100644
index 000000000..7f4955327
--- /dev/null
+++ b/pcr/openrc-net/named.init-r13
@@ -0,0 +1,248 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r13,v 1.1 2014/01/31 21:24:49 idl0r Exp $
+
+extra_commands="checkconfig checkzones"
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use logger
+ provide dns
+}
+
+NAMED_CONF=${CHROOT}/etc/bind/named.conf
+
+OPENSSL_LIBGOST=${OPENSSL_LIBGOST:-0}
+MOUNT_CHECK_TIMEOUT=${MOUNT_CHECK_TIMEOUT:-60}
+
+_mount() {
+ local from
+ local to
+ local opts
+ local ret=0
+
+ if [ "${#}" -lt 3 ]; then
+ eerror "_mount(): to few arguments"
+ return 1
+ fi
+
+ from=$1
+ to=$2
+ shift 2
+
+ opts="${*}"
+ shift $#
+
+ if [ -z "$(awk "\$2 == \"${to}\" { print \$2 }" /proc/mounts)" ]; then
+ einfo "mounting ${from} to ${to}"
+ mount ${from} ${to} ${opts}
+ ret=$?
+
+ eend $ret
+ return $ret
+ fi
+
+ return 0
+}
+
+_umount() {
+ local dir=$1
+ local ret=0
+
+ if [ -n "$(awk "\$2 == \"${dir}\" { print \$2 }" /proc/mounts)" ]; then
+ ebegin "umounting ${dir}"
+ umount ${dir}
+ ret=$?
+
+ eend $ret
+ return $ret
+ fi
+
+ return 0
+}
+
+_get_pidfile() {
+ # as suggested in bug #107724, bug 335398#c17
+ [ -n "${PIDFILE}" ] || PIDFILE=${CHROOT}$(\
+ /usr/sbin/named-checkconf -p ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} | grep 'pid-file' | cut -d\" -f2)
+ [ -z "${PIDFILE}" ] && PIDFILE=${CHROOT}/run/named/named.pid
+}
+
+check_chroot() {
+ if [ -n "${CHROOT}" ]; then
+ [ ! -d "${CHROOT}" ] && return 1
+ [ ! -d "${CHROOT}/dev" ] || [ ! -d "${CHROOT}/etc" ] || [ ! -d "${CHROOT}/var" ] && return 1
+ [ ! -d "${CHROOT}/run" ] || [ ! -d "${CHROOT}/var/log" ] && return 1
+ [ ! -d "${CHROOT}/etc/bind" ] || [ ! -d "${CHROOT}/var/bind" ] && return 1
+ [ ! -d "${CHROOT}/var/log/named" ] && return 1
+ [ ! -c "${CHROOT}/dev/null" ] || [ ! -c "${CHROOT}/dev/zero" ] && return 1
+ [ ! -c "${CHROOT}/dev/random" ] && [ ! -c "${CHROOT}/dev/urandom" ] && return 1
+ [ "${CHROOT_GEOIP:-0}" -eq 1 ] && [ ! -d "${CHROOT}/usr/share/GeoIP" ] && return 1
+ if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then
+ if [ -d "/usr/lib64" ]; then
+ [ ! -d "${CHROOT}/usr/lib64/engines" ] && return 1
+ elif [ -d "/usr/lib" ]; then
+ [ ! -d "${CHROOT}/usr/lib/engines" ] && return 1
+ fi
+ fi
+ fi
+
+ return 0
+}
+
+checkconfig() {
+ ebegin "Checking named configuration"
+
+ if [ ! -f "${NAMED_CONF}" ] ; then
+ eerror "No ${NAMED_CONF} file exists!"
+ return 1
+ fi
+
+ /usr/sbin/named-checkconf ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}} || {
+ eerror "named-checkconf failed! Please fix your config first."
+ return 1
+ }
+
+ eend 0
+ return 0
+}
+
+checkzones() {
+ ebegin "Checking named configuration and zones"
+ /usr/sbin/named-checkconf -z -j ${CHROOT:+-t} ${CHROOT} ${NAMED_CONF#${CHROOT}}
+ eend $?
+}
+
+start() {
+ local piddir
+
+ ebegin "Starting ${CHROOT:+chrooted }named"
+
+ if [ -n "${CHROOT}" ]; then
+ if [ ${CHROOT_NOCHECK:-0} -eq 0 ]; then
+ check_chroot || {
+ eend 1
+ eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first"
+ return 1
+ }
+ fi
+
+ if [ ${OPENSSL_LIBGOST:-0} -eq 1 ]; then
+ if [ ! -e /usr/lib/engines/libgost.so ]; then
+ eend 1
+ eerror "Couldn't find /usr/lib/engines/libgost.so but bind has been built with openssl and libgost support"
+ return 1
+ fi
+ cp -Lp /usr/lib/engines/libgost.so "${CHROOT}/usr/lib/engines/libgost.so" || {
+ eend 1
+ eerror "Couldn't copy /usr/lib/engines/libgost.so into '${CHROOT}/usr/lib/engines/'"
+ return 1
+ }
+ fi
+ cp -Lp /etc/localtime "${CHROOT}/etc/localtime"
+
+ if [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then
+ einfo "Mounting chroot dirs"
+ _mount /etc/bind ${CHROOT}/etc/bind -o bind
+ _mount /var/bind ${CHROOT}/var/bind -o bind
+ _mount /var/log/named ${CHROOT}/var/log/named -o bind
+ if [ "${CHROOT_GEOIP:-0}" -eq 1 ]; then
+ _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind
+ fi
+ fi
+ fi
+
+ checkconfig || { eend 1; return 1; }
+
+ # create piddir (usually /run/named) if necessary, bug 334535
+ _get_pidfile
+ piddir="${PIDFILE%/*}"
+ checkpath -q -d -o root:named -m 0770 "${piddir}" || {
+ eend 1
+ return 1
+ }
+
+ # In case someone have $CPU set in /etc/conf.d/named
+ if [ -n "${CPU}" ] && [ "${CPU}" -gt 0 ]; then
+ CPU="-n ${CPU}"
+ fi
+
+ start-stop-daemon --start --pidfile ${PIDFILE} \
+ --nicelevel ${NAMED_NICELEVEL:-0} \
+ --exec /usr/sbin/named \
+ -- -u named ${CPU} ${OPTIONS} ${CHROOT:+-t} ${CHROOT}
+ eend $?
+}
+
+stop() {
+ local reported=0
+
+ ebegin "Stopping ${CHROOT:+chrooted }named"
+
+ # Workaround for now, until openrc's restart has been fixed.
+ # openrc doesn't care about a restart() function in init scripts.
+ if [ "${RC_CMD}" = "restart" ]; then
+ if [ -n "${CHROOT}" -a ${CHROOT_NOCHECK:-0} -eq 0 ]; then
+ check_chroot || {
+ eend 1
+ eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first"
+ return 1
+ }
+ fi
+
+ checkconfig || { eend 1; return 1; }
+ fi
+
+ # -R 10, bug 335398
+ _get_pidfile
+ start-stop-daemon --stop --retry 10 --pidfile $PIDFILE \
+ --exec /usr/sbin/named
+
+ if [ -n "${CHROOT}" ] && [ "${CHROOT_NOMOUNT:-0}" -eq 0 ]; then
+ ebegin "Umounting chroot dirs"
+
+ # just to be sure everything gets clean
+ while fuser -s ${CHROOT} 2>/dev/null; do
+ if [ "${reported}" -eq 0 ]; then
+ einfo "Waiting until all named processes are stopped (max. ${MOUNT_CHECK_TIMEOUT} seconds)"
+ elif [ "${reported}" -eq "${MOUNT_CHECK_TIMEOUT}" ]; then
+ eerror "Waiting until all named processes are stopped failed!"
+ eend 1
+ break
+ fi
+ sleep 1
+ reported=$((reported+1))
+ done
+
+ [ "${CHROOT_GEOIP:-0}" -eq 1 ] && _umount ${CHROOT}/usr/share/GeoIP
+ _umount ${CHROOT}/etc/bind
+ _umount ${CHROOT}/var/log/named
+ _umount ${CHROOT}/var/bind
+ fi
+
+ eend $?
+}
+
+reload() {
+ local ret
+
+ ebegin "Reloading named.conf and zone files"
+
+ checkconfig || { eend 1; return 1; }
+
+ _get_pidfile
+ if [ -n "${PIDFILE}" ]; then
+ start-stop-daemon --pidfile $PIDFILE --signal HUP
+ ret=$?
+ else
+ ewarn "Unable to determine the pidfile... this is"
+ ewarn "a fallback mode. Please check your installation!"
+
+ $RC_SERVICE restart
+ ret=$?
+ fi
+
+ eend $ret
+}
diff --git a/pcr/openrc-net/nfs-utils.install b/pcr/openrc-net/nfs-utils.install
new file mode 100644
index 000000000..94c5170dc
--- /dev/null
+++ b/pcr/openrc-net/nfs-utils.install
@@ -0,0 +1,22 @@
+_svc=('nfs' 'nfsclient')
+_rlvl="default"
+
+post_install() {
+ echo " as server:"
+ _cmd="rc-update add ${_svc[0]} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+ echo " as client:"
+ _cmd="rc-update add ${_svc[1]} ${_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}'"
+}
diff --git a/pcr/openrc-net/nginx.install b/pcr/openrc-net/nginx.install
new file mode 100644
index 000000000..abc0af95b
--- /dev/null
+++ b/pcr/openrc-net/nginx.install
@@ -0,0 +1,16 @@
+_svc="ngix"
+_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-net/openldap.install b/pcr/openrc-net/openldap.install
new file mode 100644
index 000000000..e42575d86
--- /dev/null
+++ b/pcr/openrc-net/openldap.install
@@ -0,0 +1,16 @@
+_svc="slapd"
+_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-net/openntpd.install b/pcr/openrc-net/openntpd.install
new file mode 100644
index 000000000..5da95da83
--- /dev/null
+++ b/pcr/openrc-net/openntpd.install
@@ -0,0 +1,16 @@
+_svc="openntpd"
+_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-net/openslp.install b/pcr/openrc-net/openslp.install
new file mode 100644
index 000000000..0c8d347de
--- /dev/null
+++ b/pcr/openrc-net/openslp.install
@@ -0,0 +1,16 @@
+_svc="slpd"
+_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-net/openssh.install b/pcr/openrc-net/openssh.install
new file mode 100644
index 000000000..28855dab3
--- /dev/null
+++ b/pcr/openrc-net/openssh.install
@@ -0,0 +1,16 @@
+_svc="sshd"
+_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-net/openvpn.install b/pcr/openrc-net/openvpn.install
new file mode 100644
index 000000000..aad7ec400
--- /dev/null
+++ b/pcr/openrc-net/openvpn.install
@@ -0,0 +1,16 @@
+_svc="openvpn"
+_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-net/polipo.install b/pcr/openrc-net/polipo.install
new file mode 100644
index 000000000..a7e160c3a
--- /dev/null
+++ b/pcr/openrc-net/polipo.install
@@ -0,0 +1,16 @@
+_svc="polipo"
+_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-net/postfix.install b/pcr/openrc-net/postfix.install
new file mode 100644
index 000000000..77b596d42
--- /dev/null
+++ b/pcr/openrc-net/postfix.install
@@ -0,0 +1,16 @@
+_svc="postfix"
+_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-net/privoxy.install b/pcr/openrc-net/privoxy.install
new file mode 100644
index 000000000..ce548ab12
--- /dev/null
+++ b/pcr/openrc-net/privoxy.install
@@ -0,0 +1,16 @@
+_svc="privoxy"
+_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-net/quota-tools.install b/pcr/openrc-net/quota-tools.install
new file mode 100644
index 000000000..9090a145b
--- /dev/null
+++ b/pcr/openrc-net/quota-tools.install
@@ -0,0 +1,16 @@
+_svc="quota"
+_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-net/rpcbind.install b/pcr/openrc-net/rpcbind.install
new file mode 100644
index 000000000..486a4ddf6
--- /dev/null
+++ b/pcr/openrc-net/rpcbind.install
@@ -0,0 +1,16 @@
+_svc="rpcbind"
+_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-net/rsync.install b/pcr/openrc-net/rsync.install
new file mode 100644
index 000000000..f33606dcc
--- /dev/null
+++ b/pcr/openrc-net/rsync.install
@@ -0,0 +1,16 @@
+_svc="rsyncd"
+_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-net/samba.install b/pcr/openrc-net/samba.install
new file mode 100644
index 000000000..463b92f86
--- /dev/null
+++ b/pcr/openrc-net/samba.install
@@ -0,0 +1,16 @@
+_svc="smb"
+_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-net/saslauthd2.rc7 b/pcr/openrc-net/saslauthd2.rc7
new file mode 100644
index 000000000..d6b453e92
--- /dev/null
+++ b/pcr/openrc-net/saslauthd2.rc7
@@ -0,0 +1,21 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyrus-sasl/files/saslauthd2.rc7,v 1.1 2013/07/13 12:01:10 pacho Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting saslauthd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/saslauthd \
+ -- ${SASLAUTHD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping saslauthd"
+ start-stop-daemon --stop --quiet --pidfile /run/saslauthd/saslauthd.pid
+ eend $?
+}
diff --git a/pcr/openrc-net/squid.install b/pcr/openrc-net/squid.install
new file mode 100644
index 000000000..8d279a750
--- /dev/null
+++ b/pcr/openrc-net/squid.install
@@ -0,0 +1,16 @@
+_svc="squid"
+_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-net/syncthing.confd b/pcr/openrc-net/syncthing.confd
new file mode 100644
index 000000000..1580caea0
--- /dev/null
+++ b/pcr/openrc-net/syncthing.confd
@@ -0,0 +1,3 @@
+SYNCTHING_USER="syncthing"
+SYNCTHING_ADDRESS="127.0.0.1:8080"
+SYNCTHING_ARGS="" \ No newline at end of file
diff --git a/pcr/openrc-net/syncthing.initd b/pcr/openrc-net/syncthing.initd
new file mode 100644
index 000000000..1e5f9c678
--- /dev/null
+++ b/pcr/openrc-net/syncthing.initd
@@ -0,0 +1,22 @@
+#!/usr/bin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting syncthing"
+ start-stop-daemon --start --make-pidfile --pidfile /run/syncthing.pid \
+ --background --user ${SYNCTHING_USER} --name syncthing \
+ --exec /usr/bin/syncthing -- -gui-address=${SYNCTHING_ADDRESS} ${SYNCTHING_ARGS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping syncthing"
+ start-stop-daemon --stop --pidfile /run/syncthing.pid --user ${SYNCTHING_USER}
+ eend $?
+}
diff --git a/pcr/openrc-net/syncthing.install b/pcr/openrc-net/syncthing.install
new file mode 100644
index 000000000..67fba7249
--- /dev/null
+++ b/pcr/openrc-net/syncthing.install
@@ -0,0 +1,16 @@
+_svc="syncthing"
+_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-net/tor.install b/pcr/openrc-net/tor.install
new file mode 100644
index 000000000..d5c4f50eb
--- /dev/null
+++ b/pcr/openrc-net/tor.install
@@ -0,0 +1,16 @@
+_svc="tor"
+_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-net/transmission.install b/pcr/openrc-net/transmission.install
new file mode 100644
index 000000000..d4835888d
--- /dev/null
+++ b/pcr/openrc-net/transmission.install
@@ -0,0 +1,16 @@
+_svc="transmission-daemon"
+_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-net/ufw.install b/pcr/openrc-net/ufw.install
new file mode 100644
index 000000000..ce57bfd84
--- /dev/null
+++ b/pcr/openrc-net/ufw.install
@@ -0,0 +1,16 @@
+_svc="ufw"
+_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-net/vsftpd.install b/pcr/openrc-net/vsftpd.install
new file mode 100644
index 000000000..ff6995ce7
--- /dev/null
+++ b/pcr/openrc-net/vsftpd.install
@@ -0,0 +1,16 @@
+_svc="vsftpd"
+_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-net/wicd.initd b/pcr/openrc-net/wicd.initd
new file mode 100755
index 000000000..70123946c
--- /dev/null
+++ b/pcr/openrc-net/wicd.initd
@@ -0,0 +1,41 @@
+#!/usr/bin/openrc-run
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# opts="start stop restart"
+
+WICD_DAEMON=/usr/bin/wicd
+WICD_PIDFILE=/run/wicd/wicd.pid
+
+depend() {
+ need dbus
+ after hald
+ provide net
+}
+
+start() {
+ ebegin "Starting wicd daemon"
+ # fix Gentoo bug 296197
+ #[ -f /etc/wicd/wired-settings.conf ] && sed -i 's/^\[\]$//' /etc/wicd/wired-settings.conf
+ "${WICD_DAEMON}" >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping wicd daemon and closing connections"
+ # can't use ssd because it needs the -k option
+ "${WICD_DAEMON}" -k >/dev/null 2>&1
+ eend $?
+}
+
+force_kill() {
+ ebegin "Stopping wicd daemon"
+ start-stop-daemon --stop --pidfile "${WICD_PIDFILE}"
+ eend $?
+}
+
+restart() {
+ force_kill
+ #start
+ sve_start
+}
diff --git a/pcr/openrc-net/wicd.install b/pcr/openrc-net/wicd.install
new file mode 100644
index 000000000..0dd6c421f
--- /dev/null
+++ b/pcr/openrc-net/wicd.install
@@ -0,0 +1,20 @@
+_svc="wicd"
+_rlvl="default"
+
+post_install() {
+ _cmd="rc-update add ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+# echo "To start wicd at boot, add /etc/init.d/wicd to a runlevel and:"
+# echo "Remove all net.* initscripts (except for net.lo) from all runlevels"
+# echo "Add these scripts to the RC_PLUGsvcS line in /etc/rc.conf"
+# echo "(For example, rc_hotplug="!net.eth* !net.wlan*")"
+}
+
+post_upgrade() {
+ post_install "$1"
+}
+
+post_remove() {
+ _cmd="rc-update del ${_svc} ${_rlvl}"
+ echo " ==> run '${_cmd}'"
+}
diff --git a/pcr/openrc-net/xinetd.install b/pcr/openrc-net/xinetd.install
new file mode 100644
index 000000000..78d42f009
--- /dev/null
+++ b/pcr/openrc-net/xinetd.install
@@ -0,0 +1,16 @@
+_svc="xinetd"
+_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-net/ypbind-mt.install b/pcr/openrc-net/ypbind-mt.install
new file mode 100644
index 000000000..f0456e52c
--- /dev/null
+++ b/pcr/openrc-net/ypbind-mt.install
@@ -0,0 +1,16 @@
+_svc="ypbind"
+_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-net/ypserv.install b/pcr/openrc-net/ypserv.install
new file mode 100644
index 000000000..ebf96a0d1
--- /dev/null
+++ b/pcr/openrc-net/ypserv.install
@@ -0,0 +1,16 @@
+_svc="ypserv"
+_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}'"
+}