From 7385c6143c1b587bca68deade6e5989d11879767 Mon Sep 17 00:00:00 2001 From: freaj Date: Mon, 30 Mar 2015 10:36:00 +0200 Subject: openrc-net-20150330-1: updating version --- pcr/openrc-net/PKGBUILD | 16 +-- pcr/openrc-net/autofs5.initd | 70 +++++++++++++ pcr/openrc-net/hostapd-init.d | 39 +++++++ pcr/openrc-net/ip6tables-1.4.13.confd | 19 ++++ pcr/openrc-net/iptables-1.4.13-r1.init | 130 +++++++++++++++++++++++ pcr/openrc-net/iptables-1.4.13.confd | 19 ++++ pcr/openrc-net/lighttpd.confd | 12 +++ pcr/openrc-net/lighttpd.initd | 73 +++++++++++++ pcr/openrc-net/mit-krb5kadmind.initd-r1 | 25 +++++ pcr/openrc-net/mit-krb5kdc.initd-r1 | 24 +++++ pcr/openrc-net/mit-krb5kpropd.initd-r1 | 24 +++++ pcr/openrc-net/nfs.confd | 38 +++++++ pcr/openrc-net/nfs.initd | 163 +++++++++++++++++++++++++++++ pcr/openrc-net/nfsclient.confd | 18 ++++ pcr/openrc-net/nfsclient.initd | 34 ++++++ pcr/openrc-net/nginx.initd-r2 | 89 ++++++++++++++++ pcr/openrc-net/openntpd.conf.d-20080406-r6 | 7 ++ pcr/openrc-net/openntpd.init.d-20080406-r6 | 15 +++ pcr/openrc-net/openvpn-2.1.conf | 18 ++++ pcr/openrc-net/openvpn-2.1.init | 133 +++++++++++++++++++++++ pcr/openrc-net/polipo.initd | 54 ++++++++++ pcr/openrc-net/postfix.rc6.2.7 | 86 +++++++++++++++ pcr/openrc-net/privoxy.initd | 29 +++++ pcr/openrc-net/quota.confd | 20 ++++ pcr/openrc-net/quota.rc7 | 38 +++++++ pcr/openrc-net/rpc.gssd.initd | 24 +++++ pcr/openrc-net/rpc.idmapd.initd | 26 +++++ pcr/openrc-net/rpc.pipefs.initd | 33 ++++++ pcr/openrc-net/rpc.rquotad.initd | 26 +++++ pcr/openrc-net/rpc.statd.initd | 33 ++++++ pcr/openrc-net/rpc.svcgssd.initd | 24 +++++ pcr/openrc-net/rpc.yppasswdd-r1 | 22 ++++ pcr/openrc-net/rpc.yppasswdd.confd | 7 ++ pcr/openrc-net/rpc.ypxfrd-2.23 | 22 ++++ pcr/openrc-net/rpc.ypxfrd.confd | 3 + pcr/openrc-net/rpcbind.initd | 22 ++++ pcr/openrc-net/rsyncd.conf.d | 5 + pcr/openrc-net/rsyncd.init.d-r1 | 12 +++ pcr/openrc-net/samba4.confd | 38 +++++++ pcr/openrc-net/samba4.initd-r1 | 56 ++++++++++ pcr/openrc-net/slapd-confd-2.4.28-r1 | 26 +++++ pcr/openrc-net/slapd-initd-2.4.28-r1 | 36 +++++++ pcr/openrc-net/slpd-init | 89 ++++++++++++++++ pcr/openrc-net/squid.confd-r1 | 13 +++ pcr/openrc-net/squid.initd-r4 | 118 +++++++++++++++++++++ pcr/openrc-net/sshd.confd | 21 ++++ pcr/openrc-net/sshd.rc6.4 | 87 +++++++++++++++ pcr/openrc-net/tor.confd | 3 + pcr/openrc-net/tor.initd-r6 | 60 +++++++++++ pcr/openrc-net/transmission-daemon.confd.4 | 14 +++ pcr/openrc-net/transmission-daemon.initd.9 | 73 +++++++++++++ pcr/openrc-net/ufw-2.initd | 137 ++++++++++++++++++++++++ pcr/openrc-net/ufw.confd | 5 + pcr/openrc-net/vsftpd-checkconfig.sh | 29 +++++ pcr/openrc-net/vsftpd.init | 51 +++++++++ pcr/openrc-net/xinetd.confd | 3 + pcr/openrc-net/xinetd.rc6 | 33 ++++++ pcr/openrc-net/ypbind.confd-r1 | 4 + pcr/openrc-net/ypbind.initd | 41 ++++++++ pcr/openrc-net/ypserv | 23 ++++ pcr/openrc-net/ypserv.confd | 4 + 61 files changed, 2408 insertions(+), 8 deletions(-) create mode 100644 pcr/openrc-net/autofs5.initd create mode 100644 pcr/openrc-net/hostapd-init.d create mode 100644 pcr/openrc-net/ip6tables-1.4.13.confd create mode 100644 pcr/openrc-net/iptables-1.4.13-r1.init create mode 100644 pcr/openrc-net/iptables-1.4.13.confd create mode 100644 pcr/openrc-net/lighttpd.confd create mode 100644 pcr/openrc-net/lighttpd.initd create mode 100644 pcr/openrc-net/mit-krb5kadmind.initd-r1 create mode 100644 pcr/openrc-net/mit-krb5kdc.initd-r1 create mode 100644 pcr/openrc-net/mit-krb5kpropd.initd-r1 create mode 100644 pcr/openrc-net/nfs.confd create mode 100644 pcr/openrc-net/nfs.initd create mode 100644 pcr/openrc-net/nfsclient.confd create mode 100644 pcr/openrc-net/nfsclient.initd create mode 100644 pcr/openrc-net/nginx.initd-r2 create mode 100644 pcr/openrc-net/openntpd.conf.d-20080406-r6 create mode 100644 pcr/openrc-net/openntpd.init.d-20080406-r6 create mode 100644 pcr/openrc-net/openvpn-2.1.conf create mode 100644 pcr/openrc-net/openvpn-2.1.init create mode 100644 pcr/openrc-net/polipo.initd create mode 100644 pcr/openrc-net/postfix.rc6.2.7 create mode 100644 pcr/openrc-net/privoxy.initd create mode 100644 pcr/openrc-net/quota.confd create mode 100644 pcr/openrc-net/quota.rc7 create mode 100644 pcr/openrc-net/rpc.gssd.initd create mode 100644 pcr/openrc-net/rpc.idmapd.initd create mode 100644 pcr/openrc-net/rpc.pipefs.initd create mode 100644 pcr/openrc-net/rpc.rquotad.initd create mode 100644 pcr/openrc-net/rpc.statd.initd create mode 100644 pcr/openrc-net/rpc.svcgssd.initd create mode 100644 pcr/openrc-net/rpc.yppasswdd-r1 create mode 100644 pcr/openrc-net/rpc.yppasswdd.confd create mode 100644 pcr/openrc-net/rpc.ypxfrd-2.23 create mode 100644 pcr/openrc-net/rpc.ypxfrd.confd create mode 100644 pcr/openrc-net/rpcbind.initd create mode 100644 pcr/openrc-net/rsyncd.conf.d create mode 100644 pcr/openrc-net/rsyncd.init.d-r1 create mode 100644 pcr/openrc-net/samba4.confd create mode 100644 pcr/openrc-net/samba4.initd-r1 create mode 100644 pcr/openrc-net/slapd-confd-2.4.28-r1 create mode 100644 pcr/openrc-net/slapd-initd-2.4.28-r1 create mode 100644 pcr/openrc-net/slpd-init create mode 100644 pcr/openrc-net/squid.confd-r1 create mode 100644 pcr/openrc-net/squid.initd-r4 create mode 100644 pcr/openrc-net/sshd.confd create mode 100644 pcr/openrc-net/sshd.rc6.4 create mode 100644 pcr/openrc-net/tor.confd create mode 100644 pcr/openrc-net/tor.initd-r6 create mode 100644 pcr/openrc-net/transmission-daemon.confd.4 create mode 100644 pcr/openrc-net/transmission-daemon.initd.9 create mode 100644 pcr/openrc-net/ufw-2.initd create mode 100644 pcr/openrc-net/ufw.confd create mode 100644 pcr/openrc-net/vsftpd-checkconfig.sh create mode 100644 pcr/openrc-net/vsftpd.init create mode 100644 pcr/openrc-net/xinetd.confd create mode 100644 pcr/openrc-net/xinetd.rc6 create mode 100644 pcr/openrc-net/ypbind.confd-r1 create mode 100644 pcr/openrc-net/ypbind.initd create mode 100644 pcr/openrc-net/ypserv create mode 100644 pcr/openrc-net/ypserv.confd diff --git a/pcr/openrc-net/PKGBUILD b/pcr/openrc-net/PKGBUILD index a0f5bf1a5..ed3450d63 100644 --- a/pcr/openrc-net/PKGBUILD +++ b/pcr/openrc-net/PKGBUILD @@ -116,7 +116,7 @@ pkgname=('autofs-openrc' 'wicd-openrc' 'syncthing-openrc' 'nginx-openrc') -pkgver=20150119 +pkgver=20150330 pkgrel=1 pkgdesc="OpenRC init scripts" arch=('any') @@ -685,7 +685,7 @@ sha256sums=('8e093a18582c3a20283ed1c09de9acc6832a80b1d5a02962599db0535d38af19' 'e8a413e9102948b336f60041fc3cade33125faf56d8319ee65d9f3c63199a8e7' 'a157630c3bdc9565cca8240ee1e6539fc9cbc1e4642c40e0965e3609d1021bac' '099f668e1ad42ed9446b15675032a1186715d1fe9e4a1b24dfb787e68495d2b6' - '049a231908dc2c5f82446712d71d5e75d430bd043b53eead1529f2d81e1595ab' + 'b5811c6adf10d6210e5685b4e999f0449ac492379d055226eeb140f00d9b8702' '204aaf81d51dc119cee1d1ff3ae3dd50af666af2f8b2a363fd1bf442d4dcee00' '916f4b14095ee4ec8a510391c883e9f01868e18d79a3d5cbeb13a104a793d45d' 'b9701b9ea509638ee1ed74bec38a22e6bd7358763497ce53c146d2faf9e97a61' @@ -697,15 +697,15 @@ sha256sums=('8e093a18582c3a20283ed1c09de9acc6832a80b1d5a02962599db0535d38af19' 'c374ea05d7e9f15e10c8f9dbd0cad6548e0f92aef7de33e5dbc27222e9407e7b' 'bb6e6721f33e6582a91025f3500e159a599fb856d699e9394093e1018c7925e0' 'b1515472c32927039b38f6c3a797cbc54a5a300b5d6fa54df9550174afa2b7f8' - '22bba4ee5d58bae422650875c7c8a797a52fc121ddd02d48297c075b8a35401e' + 'c652a4fe8a43dc68a818345db2b3acc560663b5b6c969324d4f23afb0fb96a94' '1e77bc6fb2ceb266f724818898bd42bec47512a5a7ede6660e0565ea1c58d619' - 'a1ecfb9441052d374b6bc2b77554a3253a4e4c231c76114b3313d2cc68e561b8' - '426996fc12758565d4c827762df76634f40cc8915988ab89ba5e81aeb561cf46' + 'e8842fca856eae598fb8fe15ed8d3cef13e61851217be66b8cc4087af8cee8ad' + '122ade9931af8f64696375c9c66d00f64a90949616e00e9a00a7264c50c2e8a7' '3ce65326859c43983dad25ad2d4731488c488037796e39b6b5eda336e8bf81ef' 'ebee63e81fb952474c34b745913e8774b29c9cc65180d363a33d991e478aea2d' '00d9c29280a83e8458c33139d04a9b38c6fdba9d7cb9b420ca83bf6b10e6435d' 'f1c460d8b0e91e54a551397d755135d05a3728d81de596535bf8bda074455677' - '0c7bd35a14da6c0c2577f09ae82a41ddb693a88157eeaf80684616f79be6c304' + 'a5731b8f681111421277c6c1c43b3e1d303790d9f8aebd977a895b0ed7a73bc3' '5bca003ec3b67c7c78519aede1d82002579006ccfecce8f87b559df719f82e92' '1fc515a6816b8a750db513df0b3b9bf8dd8bd4c4e9051205521acadfdebeae0f' '7f228796e020c0779c52683f684197d50662ae890b1ae193ffa9acf157ccd143' @@ -729,7 +729,7 @@ sha256sums=('8e093a18582c3a20283ed1c09de9acc6832a80b1d5a02962599db0535d38af19' '069aa7382b40aecebf26ef53f3f4c49890314e0357925c84b3c15f1d0b913be0' '657b5305923b2a5de9eb96931aaaa28d6e997ace6c40793d905887798094258c' '2de7c7c1edfe3ae0480e22d988a564db3bb873050929ebb6e8361d7a1288ddda' - 'e6cf3df546aae57bb10e2b4282a9ccd79741473ef9dbdbd7628a16c84622da06' + '4297952eeeb02b5c4f2f750742614513fa6a0c8d291a9a0adcec1ec0098fcd78' 'e401e2cf7c0180a170d3dc3e91d7e98002bae7b013df72813b7bcf89b864fb3a' '6aeb4ec9b8ccc062b5ee8c609830c05cee3ed790fa90d7b2d8cf82a09e317c5c' '79f6c6ed4875f00fe702f69e9a6180a032d5a47f3e58e892e6ba0e2746b6fec8' @@ -746,7 +746,7 @@ sha256sums=('8e093a18582c3a20283ed1c09de9acc6832a80b1d5a02962599db0535d38af19' '91fb1497b3a6ef0bb3a3d5baefdff801d8ff1cba27aaf742303415550814a09b' 'fca7183a7676f0f471878925c8fbec20b7a0bff01551c0ad2b34d4d8a826c876' '41d780f291847e19f632428bbf27c3f289414afd237546d2974da1b75384c25c' - '49da1b5f267927023bc092adcf89d406ec294584039d6bca6b7aea0a9e7c4c4f' + '17cfda4d50a3d3fd74f36c79dec78b5f89fe6b45712729d8bbdbddd7e8ea9a10' '66b2b53b077ddc2d5eb1d81faa99fa0f4f0db01520900ba948001e539bfe02d8' 'eb4a4315916fe3f8688c1da5bb5c249a1f402e61617452288d5b0668078c955c' '63708b1a7b61ae791df64bb4cefa01dc12236f96bb67fe6d0b2c513e11c81f3e' diff --git a/pcr/openrc-net/autofs5.initd b/pcr/openrc-net/autofs5.initd new file mode 100644 index 000000000..939444e02 --- /dev/null +++ b/pcr/openrc-net/autofs5.initd @@ -0,0 +1,70 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs5.initd,v 1.4 2013/11/10 15:53:29 tomwij Exp $ + +DAEMON=/usr/sbin/automount +PIDFILE=/var/run/autofs.pid +DEVICE=autofs + +depend() { + need localmount + use ypbind nfs slapd portmap net +} + +extra_started_commands="reload" + +start() { + ebegin "Starting automounter" + + # Ensure autofs support is loaded + grep -q autofs /proc/filesystems || modprobe -q autofs4 + if [ $? -ne 0 ]; then + eend 1 "No autofs support available in kernel" + return 1 + fi + + # Check misc device + if [ -n "${USE_MISC_DEVICE}" -a "${USE_MISC_DEVICE}" = "yes" ]; then + sleep 1 + if [ -e "/proc/misc" ]; then + MINOR=$(awk "/${DEVICE}/ {print \$1}" /proc/misc) + if [ -n "${MINOR}" -a ! -c "/dev/${DEVICE}" ]; then + mknod -m 0600 "/dev/${DEVICE}" c 10 ${MINOR} + if [ $? -ne 0 ]; then + eend 1 "Could not create '/dev/${DEVICE}'" + return 1 + fi + fi + fi + if [ -x /sbin/restorecon -a -c "/dev/${DEVICE}" ]; then + /sbin/restorecon "/dev/${DEVICE}" + if [ $? -ne 0 ]; then + eend 1 "Failed to execute '/sbin/restorecon \"/dev/${DEVICE}\"'" + return 1 + fi + fi + else + [ -c "/dev/${DEVICE}" ] && rm -rf "/dev/${DEVICE}" + fi + + start-stop-daemon --start --exec ${DAEMON} -- -p ${PIDFILE} ${OPTIONS} + + eend $? +} + +stop() { + ebegin "Stopping automounter" + start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE} + eend $? +} + +reload() { + ebegin "Reloading automounter" + if [ ! -r "${PIDFILE}" ]; then + eend 1 "automount not running" + else + kill -s HUP $(cat "${PIDFILE}") 2> /dev/null + eend $? + fi +} diff --git a/pcr/openrc-net/hostapd-init.d b/pcr/openrc-net/hostapd-init.d new file mode 100644 index 000000000..d09002b66 --- /dev/null +++ b/pcr/openrc-net/hostapd-init.d @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/files/hostapd-init.d,v 1.4 2014/03/21 19:47:14 gurligebis Exp $ + +pidfile="/run/${SVCNAME}.pid" +command="/usr/sbin/hostapd" +command_args="-P ${pidfile} -B ${OPTIONS} ${CONFIGS}" + +extra_started_commands="reload" + +depend() { + local myneeds= + for iface in ${INTERFACES}; do + myneeds="${myneeds} net.${iface}" + done + + [ -n "${myneeds}" ] && need ${myneeds} + use logger +} + +start_pre() { + local file + + for file in ${CONFIGS}; do + if [ ! -r "${file}" ]; then + eerror "hostapd configuration file (${CONFIG}) not found" + return 1 + fi + done +} + +reload() { + start_pre || return 1 + + ebegin "Reloading ${SVCNAME} configuration" + kill -HUP $(cat ${pidfile}) > /dev/null 2>&1 + eend $? +} diff --git a/pcr/openrc-net/ip6tables-1.4.13.confd b/pcr/openrc-net/ip6tables-1.4.13.confd new file mode 100644 index 000000000..3bb36989d --- /dev/null +++ b/pcr/openrc-net/ip6tables-1.4.13.confd @@ -0,0 +1,19 @@ +# /etc/conf.d/ip6tables + +# Location in which iptables initscript will save set rules on +# service shutdown +IP6TABLES_SAVE="/var/lib/ip6tables/rules-save" + +# Options to pass to iptables-save and iptables-restore +SAVE_RESTORE_OPTIONS="-c" + +# Save state on stopping iptables +SAVE_ON_STOP="yes" + +# If you need to log iptables messages as soon as iptables starts, +# AND your logger does NOT depend on the network, then you may wish +# to uncomment the next line. +# If your logger depends on the network, and you uncomment this line +# you will create an unresolvable circular dependency during startup. +# After commenting or uncommenting this line, you must run 'rc-update -u'. +#rc_use="logger" diff --git a/pcr/openrc-net/iptables-1.4.13-r1.init b/pcr/openrc-net/iptables-1.4.13-r1.init new file mode 100644 index 000000000..a63d07688 --- /dev/null +++ b/pcr/openrc-net/iptables-1.4.13-r1.init @@ -0,0 +1,130 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/iptables-1.4.13-r1.init,v 1.3 2013/04/27 17:29:09 vapier Exp $ + +extra_commands="check save panic" +extra_started_commands="reload" + +iptables_name=${SVCNAME} +case ${iptables_name} in +iptables|ip6tables) ;; +*) iptables_name="iptables" ;; +esac + +iptables_bin="/sbin/${iptables_name}" +case ${iptables_name} in + iptables) iptables_proc="/proc/net/ip_tables_names" + iptables_save=${IPTABLES_SAVE};; + ip6tables) iptables_proc="/proc/net/ip6_tables_names" + iptables_save=${IP6TABLES_SAVE};; +esac + +depend() { + need localmount #434774 + before net +} + +set_table_policy() { + local chains table=$1 policy=$2 + case ${table} in + nat) chains="PREROUTING POSTROUTING OUTPUT";; + mangle) chains="PREROUTING INPUT FORWARD OUTPUT POSTROUTING";; + filter) chains="INPUT FORWARD OUTPUT";; + *) chains="";; + esac + local chain + for chain in ${chains} ; do + ${iptables_bin} -t ${table} -P ${chain} ${policy} + done +} + +checkkernel() { + if [ ! -e ${iptables_proc} ] ; then + eerror "Your kernel lacks ${iptables_name} support, please load" + eerror "appropriate modules and try again." + return 1 + fi + return 0 +} +checkconfig() { + if [ ! -f ${iptables_save} ] ; then + eerror "Not starting ${iptables_name}. First create some rules then run:" + eerror "/etc/init.d/${iptables_name} save" + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Loading ${iptables_name} state and starting firewall" + ${iptables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${iptables_save}" + eend $? +} + +stop() { + if [ "${SAVE_ON_STOP}" = "yes" ] ; then + save || return 1 + fi + checkkernel || return 1 + ebegin "Stopping firewall" + local a + for a in $(cat ${iptables_proc}) ; do + set_table_policy $a ACCEPT + + ${iptables_bin} -F -t $a + ${iptables_bin} -X -t $a + done + eend $? +} + +reload() { + checkkernel || return 1 + checkrules || return 1 + ebegin "Flushing firewall" + local a + for a in $(cat ${iptables_proc}) ; do + ${iptables_bin} -F -t $a + ${iptables_bin} -X -t $a + done + eend $? + + start +} + +checkrules() { + ebegin "Checking rules" + ${iptables_bin}-restore --test ${SAVE_RESTORE_OPTIONS} < "${iptables_save}" + eend $? +} + +check() { + # Short name for users of init.d script. + checkrules +} + +save() { + ebegin "Saving ${iptables_name} state" + checkpath -q -d "$(dirname "${iptables_save}")" + checkpath -q -m 0600 -f "${iptables_save}" + ${iptables_bin}-save ${SAVE_RESTORE_OPTIONS} > "${iptables_save}" + eend $? +} + +panic() { + checkkernel || return 1 + if service_started ${iptables_name}; then + rc-service ${iptables_name} stop + fi + + local a + ebegin "Dropping all packets" + for a in $(cat ${iptables_proc}) ; do + ${iptables_bin} -F -t $a + ${iptables_bin} -X -t $a + + set_table_policy $a DROP + done + eend $? +} diff --git a/pcr/openrc-net/iptables-1.4.13.confd b/pcr/openrc-net/iptables-1.4.13.confd new file mode 100644 index 000000000..7225374c3 --- /dev/null +++ b/pcr/openrc-net/iptables-1.4.13.confd @@ -0,0 +1,19 @@ +# /etc/conf.d/iptables + +# Location in which iptables initscript will save set rules on +# service shutdown +IPTABLES_SAVE="/var/lib/iptables/rules-save" + +# Options to pass to iptables-save and iptables-restore +SAVE_RESTORE_OPTIONS="-c" + +# Save state on stopping iptables +SAVE_ON_STOP="yes" + +# If you need to log iptables messages as soon as iptables starts, +# AND your logger does NOT depend on the network, then you may wish +# to uncomment the next line. +# If your logger depends on the network, and you uncomment this line +# you will create an unresolvable circular dependency during startup. +# After commenting or uncommenting this line, you must run 'rc-update -u'. +#rc_use="logger" diff --git a/pcr/openrc-net/lighttpd.confd b/pcr/openrc-net/lighttpd.confd new file mode 100644 index 000000000..f3afb07a5 --- /dev/null +++ b/pcr/openrc-net/lighttpd.confd @@ -0,0 +1,12 @@ +# /etc/conf.d/lighttpd + +# Location of a shell used by the 'include_shell' directive +# in the lighttpd's configuration file +#export SHELL="/bin/bash" + +# Location of the lighttpd configuration file +LIGHTTPD_CONF="/etc/lighttpd/lighttpd.conf" + +# Location of the lighttpd pid file +LIGHTTPD_PID="$(/usr/bin/awk '/^server.pid-file/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})" + diff --git a/pcr/openrc-net/lighttpd.initd b/pcr/openrc-net/lighttpd.initd new file mode 100644 index 000000000..43626c026 --- /dev/null +++ b/pcr/openrc-net/lighttpd.initd @@ -0,0 +1,73 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/files/lighttpd.initd,v 1.22 2013/02/06 19:36:51 hwoarang Exp $ + +extra_started_commands="reload graceful" + +depend() { + need net + use mysql logger spawn-fcgi ldap slapd netmount dns + after famd + after sshd +} + +checkconfig() { + if [ ! -f "${LIGHTTPD_CONF}" ] ; then + ewarn "${LIGHTTPD_CONF} does not exist." + return 1 + fi + + if [ -z "${LIGHTTPD_PID}" ] ; then + ewarn "server.pid-file variable in ${LIGHTTPD_CONF}" + ewarn "is not set. Falling back to lighttpd.pid" + LIGHTTPD_PID="/run/lighttpd.pid" + fi + /usr/sbin/lighttpd -t -f ${LIGHTTPD_CONF} >/dev/null +} + +start() { + checkconfig || return 1 + checkpath -d -q -m 0750 -o lighttpd:lighttpd /run/lighttpd/ + + ebegin "Starting lighttpd" + start-stop-daemon --start --quiet --exec /usr/sbin/lighttpd \ + --pidfile "${LIGHTTPD_PID}" -- -f "${LIGHTTPD_CONF}" + eend $? +} + +stop() { + local rv=0 + ebegin "Stopping lighttpd" + start-stop-daemon --stop --quiet --pidfile "${LIGHTTPD_PID}" + eend $? +} + +reload() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} isn't running" + return 1 + fi + checkconfig || return 1 + + ebegin "Re-opening lighttpd log files" + start-stop-daemon --quiet --pidfile "${LIGHTTPD_PID}" \ + --signal HUP + eend $? +} + +graceful() { + if ! service_started "${SVCNAME}" ; then + eerror "${SVCNAME} isn't running" + return 1 + fi + checkconfig || return 1 + + ebegin "Gracefully stopping lighttpd" + start-stop-daemon --quiet --pidfile "${LIGHTTPD_PID}" \ + --signal INT + if eend $? ; then + rm -f "${LIGHTTPD_PID}" + start + fi +} diff --git a/pcr/openrc-net/mit-krb5kadmind.initd-r1 b/pcr/openrc-net/mit-krb5kadmind.initd-r1 new file mode 100644 index 000000000..7b28fb2ae --- /dev/null +++ b/pcr/openrc-net/mit-krb5kadmind.initd-r1 @@ -0,0 +1,25 @@ +#!/sbin/runscript + +#--------------------------------------------------------------------------- +# This script starts/stops the MIT Kerberos 5 Admin daemon +#--------------------------------------------------------------------------- + +daemon="MIT Kerberos 5 Admin daemon" +exec="/usr/sbin/kadmind" + +depend() { + need mit-krb5kdc + use net +} + +start() { + ebegin "Starting $daemon" + start-stop-daemon --start --quiet --exec ${exec} 1>&2 + eend $? "Error starting $daemon" +} + +stop() { + ebegin "Stopping $daemon" + start-stop-daemon --stop --quiet --exec ${exec} 1>&2 + eend $? "Error stopping $daemon" +} diff --git a/pcr/openrc-net/mit-krb5kdc.initd-r1 b/pcr/openrc-net/mit-krb5kdc.initd-r1 new file mode 100644 index 000000000..94f1f7937 --- /dev/null +++ b/pcr/openrc-net/mit-krb5kdc.initd-r1 @@ -0,0 +1,24 @@ +#!/sbin/runscript + +#--------------------------------------------------------------------------- +# This script starts/stops the MIT Kerberos 5 KDC +#--------------------------------------------------------------------------- + +daemon="MIT Kerberos 5 KDC" +exec="/usr/sbin/krb5kdc" + +depend() { + use net +} + +start() { + ebegin "Starting $daemon" + start-stop-daemon --start --quiet --exec ${exec} 1>&2 + eend $? "Error starting $daemon" +} + +stop() { + ebegin "Stopping $daemon" + start-stop-daemon --stop --quiet --exec ${exec} 1>&2 + eend $? "Error stopping $daemon" +} diff --git a/pcr/openrc-net/mit-krb5kpropd.initd-r1 b/pcr/openrc-net/mit-krb5kpropd.initd-r1 new file mode 100644 index 000000000..d800d666a --- /dev/null +++ b/pcr/openrc-net/mit-krb5kpropd.initd-r1 @@ -0,0 +1,24 @@ +#!/sbin/runscript + +#--------------------------------------------------------------------------- +# This script starts/stops the MIT Kerberos 5 kpropd +#--------------------------------------------------------------------------- + +daemon="MIT Kerberos 5 kpropd" +exec="/usr/sbin/kpropd" + +depend() { + use net mit-krb5kdc mit-krb5kadmind +} + +start() { + ebegin "Starting $daemon" + start-stop-daemon --start --quiet --exec ${exec} -- -S 1>&2 + eend $? "Error starting $daemon" +} + +stop() { + ebegin "Stopping $daemon" + start-stop-daemon --stop --quiet --exec ${exec} 1>&2 + eend $? "Error stopping $daemon" +} diff --git a/pcr/openrc-net/nfs.confd b/pcr/openrc-net/nfs.confd new file mode 100644 index 000000000..9dc14058c --- /dev/null +++ b/pcr/openrc-net/nfs.confd @@ -0,0 +1,38 @@ +# /etc/conf.d/nfs + +# If you wish to set the port numbers for lockd, +# please see /etc/sysctl.conf + +# Optional services to include in default `/etc/init.d/nfs start` +# For NFSv4 users, you'll want to add "rpc.idmapd" here. +NFS_NEEDED_SERVICES="" + +# Options to pass to rpc.nfsd +OPTS_RPC_NFSD="8" + +# Options to pass to rpc.mountd +# ex. OPTS_RPC_MOUNTD="-p 32767" +OPTS_RPC_MOUNTD="" + +# Options to pass to rpc.statd +# ex. OPTS_RPC_STATD="-p 32765 -o 32766" +OPTS_RPC_STATD="" + +# Options to pass to rpc.idmapd +OPTS_RPC_IDMAPD="" + +# Options to pass to rpc.gssd +OPTS_RPC_GSSD="" + +# Options to pass to rpc.svcgssd +OPTS_RPC_SVCGSSD="" + +# Options to pass to rpc.rquotad (requires sys-fs/quota) +OPTS_RPC_RQUOTAD="" + +# Timeout (in seconds) for exportfs +EXPORTFS_TIMEOUT=30 + +# Options to set in the nfsd filesystem (/proc/fs/nfsd/). +# Format is