#53 OpenRC Init Script Repackaging
Opened 2 years ago by morris. Modified 2 years ago
morris/abslibre nonsystemd-openrc  into  pull-requests

brltty
Morris Zuss • 2 years ago  
@@ -0,0 +1,25 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ 

+ pkgname=acpid-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC acpid init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'acpid')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/acpid')

+ source=("acpid.confd"

+         "acpid.initd")

+ sha512sums=('518cb397b2aa63b893ead1be08f32fe436d19b72663dee66834cfbc112b003333f0df8b9e4f1ffe64b813783f657d3fe8b9a0c5e992d5665583357e68b266705'

+             '16ba6ef1638d2069d6065b16becbaf79059d59771f3134512380aea1fe3468b50c42d5a664398cd31ee9bb21d7fc4f31b683a3094e26f8d5a202675b5ffad2cb')

+ 

+ package() {

+   install -Dm755 "$srcdir/acpid.initd" "$pkgdir/etc/init.d/acpid"

+   install -Dm644 "$srcdir/acpid.confd" "$pkgdir/etc/conf.d/acpid"

+ }

@@ -0,0 +1,6 @@ 

+ # /etc/conf.d/acpid: config file for /etc/init.d/acpid

+ 

+ # Options to pass to the acpid daemon.

+ # See the acpid(8) man page for more info.

+ 

+ ACPID_ARGS=""

@@ -0,0 +1,22 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_started_commands="reload"

+ command="/usr/bin/acpid"

+ command_args="${ACPID_ARGS}"

+ description="Daemon for Advanced Configuration and Power Interface"

+ supervisor="supervise-daemon"

+ command_args_foreground="--foreground"

+ #pidfile="/run/acpid.pid"

+ 

+ depend() {

+ 	need localmount

+ 	use logger

+ }

+ 

+ reload() {

+ 	ebegin "Reloading acpid configuration"

+ 	${supervisor} ${RC_SVCNAME} --signal HUP --pidfile /run/acpid.pid

+ 	eend $?

+ }

@@ -0,0 +1,23 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=alsa-utils-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC alsa-utils init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'alsa-utils')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/alsasound')

+ source=("alsasound.confd"

+         "alsasound.initd")

+ sha512sums=('90c1e974276945f7632dc370a005b58d669b93edbf27116098d4831e69c11c26d9b21e7eacfaf12c50019f8c88dc1f370101e2d905fdde40887fe36bac00d83e'

+             '2c47ce37f426c14566e4c408d3c73df87900f50818f83a90f8e2238c1256b45e0933dd72a03c08e5b636291696c0e9119b1a6cbe5ed6291208b1a38762a67625')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/alsasound.initd "${pkgdir}"/etc/init.d/alsasound

+   install -Dm644 "${srcdir}"/alsasound.confd "${pkgdir}"/etc/conf.d/alsasound

+ }

+ 

@@ -0,0 +1,15 @@ 

+ # RESTORE_ON_START:

+ # Do you want to restore your mixer settings?  If not, your cards will be

+ # muted.

+ # no - Do not restore state

+ # yes - Restore state

+ 

+ RESTORE_ON_START="yes"

+ 

+ # SAVE_ON_STOP:

+ # Do you want to save changes made to your mixer volumes when alsasound

+ # stops? 

+ # no - Do not save state

+ # yes - Save state

+ 

+ SAVE_ON_STOP="yes"

@@ -0,0 +1,87 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ alsastatedir=/var/lib/alsa

+ alsascrdir=/etc/alsa.d

+ alsahomedir=/run/alsasound

+ 

+ extra_commands="save restore"

+ 

+ depend() {

+ 	need localmount

+ 	after bootmisc modules isapnp coldplug hotplug

+ }

+ 

+ restore() {

+ 	ebegin "Restoring Mixer Levels"

+ 

+ 	checkpath -q -d -m 0700 -o root:root ${alsahomedir} || return 1

+ 

+ 	if [ ! -r "${alsastatedir}/asound.state" ] ; then

+ 		ewarn "No mixer config in ${alsastatedir}/asound.state, you have to unmute your card!"

+ 		eend 0

+ 		return 0

+ 	fi

+ 

+ 	local cards="$(sed -n -e 's/^ *\([[:digit:]]*\) .*/\1/p' /proc/asound/cards)"

+ 	local CARDNUM

+ 	for cardnum in ${cards}; do

+ 		[ -e /dev/snd/controlC${cardnum} ] || sleep 2

+ 		[ -e /dev/snd/controlC${cardnum} ] || sleep 2

+ 		[ -e /dev/snd/controlC${cardnum} ] || sleep 2

+ 		[ -e /dev/snd/controlC${cardnum} ] || sleep 2

+ 		alsactl -E HOME="${alsahomedir}" -I -f "${alsastatedir}/asound.state" restore ${cardnum} \

+ 			|| ewarn "Errors while restoring defaults, ignoring"

+ 	done

+ 

+ 	for ossfile in "${alsastatedir}"/oss/card*_pcm* ; do

+ 		[ -e "${ossfile}" ] || continue

+ 		# We use cat because I'm not sure if cp works properly on /proc

+ 		local procfile=${ossfile##${alsastatedir}/oss}

+ 		procfile="$(echo "${procfile}" | sed -e 's,_,/,g')"

+ 		if [ -e /proc/asound/"${procfile}"/oss ] ; then

+ 		    cat "${ossfile}" > /proc/asound/"${procfile}"/oss 

+ 		fi

+ 	done

+ 

+ 	eend 0

+ }

+ 

+ save() {

+ 	ebegin "Storing ALSA Mixer Levels"

+ 

+ 	checkpath -q -d -m 0700 -o root:root ${alsahomedir} || return 1

+ 

+ 	mkdir -p "${alsastatedir}"

+ 	if ! alsactl -E HOME="${alsahomedir}" -f "${alsastatedir}/asound.state" store; then

+ 		eerror "Error saving levels."

+ 		eend 1

+ 		return 1

+ 	fi

+ 

+ 	for ossfile in /proc/asound/card*/pcm*/oss; do

+ 		[ -e "${ossfile}" ] || continue

+ 		local device=${ossfile##/proc/asound/} ; device=${device%%/oss}

+ 		device="$(echo "${device}" | sed -e 's,/,_,g')"

+ 		mkdir -p "${alsastatedir}/oss/"

+ 		cp "${ossfile}" "${alsastatedir}/oss/${device}"

+ 	done

+ 

+ 	eend 0

+ }

+ 

+ start() {

+ 	if [ "${RESTORE_ON_START}" = "yes" ]; then

+ 		restore

+ 	fi

+ 

+ 	return 0

+ }

+ 

+ stop() {

+ 	if [ "${SAVE_ON_STOP}" = "yes" ]; then

+ 		save

+ 	fi

+ 	return 0

+ }

@@ -0,0 +1,37 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=apache-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC apache init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('apache' 'openrc')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/httpd')

+ source=("httpd.initd"

+ 	"httpd.confd")

+ sha512sums=('3fb9e5ed081d921019e3b2287d6e3655cb299c28be653a7a52c15859bdaca12c14c22380e1573426e36d39295b0fb2d5dcdc030fded55ab8f5e88424156ffbd5'

+             'fb28f9b4290e67b1ff650c1929682f41d7cb98b4d4f257a98062b2217b2ede4895818a6e97b90b7e151f9ab22f5e6fdcd08ca74fa66696b6effcb762c86e2f1e')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/httpd.initd "${pkgdir}"/etc/init.d/httpd

+   install -Dm644 "${srcdir}"/httpd.confd "${pkgdir}"/etc/conf.d/httpd

+ 

+   sed -e 's|/usr/sbin/apache2|/usr/bin/apachectl|' \

+       -e 's|/etc/apache2/httpd.conf|/etc/httpd/conf/httpd.conf|' \

+       -e 's/! test -f/test -f/' \

+       -e 's|/usr/lib/apache2|/usr/lib/httpd|' \

+       -e 's|apache2.pid|httpd/httpd.pid|' \

+       -e 's|apache2 >/dev/null|httpd >/dev/null|' \

+       -e 's|/run/apache_ssl_mutex|/run/httpd|' \

+       -i "${pkgdir}/etc/init.d/httpd"

+ 

+   sed -e 's|/etc/apache2/httpd.conf|/etc/httpd/conf/httpd.conf|' \

+       -e 's|/usr/lib/apache2|/usr/lib/httpd|' \

+       -e 's|apache2.pid|httpd/httpd.pid|' \

+       -e 's|apache2|httpd|g' \

+       -i "${pkgdir}/etc/conf.d/httpd"

+ }

@@ -0,0 +1,74 @@ 

+ # /etc/conf.d/httpd: config file for /etc/init.d/httpd

+ 

+ # When you install a module it is easy to activate or deactivate the modules

+ # and other features of apache using the APACHE2_OPTS line. Every module should

+ # install a configuration in /etc/httpd/modules.d. In that file will have an

+ # <IfDefine NNN> directive where NNN is the option to enable that module.

+ #

+ # Here are the options available in the default configuration:

+ #

+ #  AUTH_DIGEST  Enables mod_auth_digest

+ #  AUTHNZ_LDAP  Enables authentication through mod_ldap (available if USE=ldap)

+ #  CACHE        Enables mod_cache

+ #  DAV          Enables mod_dav

+ #  ERRORDOCS    Enables default error documents for many languages.

+ #  INFO         Enables mod_info, a useful module for debugging

+ #  LANGUAGE     Enables content-negotiation based on language and charset.

+ #  LDAP         Enables mod_ldap (available if USE=ldap)

+ #  MANUAL       Enables /manual/ to be the apache manual (available if USE=docs)

+ #  MEM_CACHE    Enables default configuration mod_mem_cache

+ #  PROXY        Enables mod_proxy

+ #  SSL          Enables SSL (available if USE=ssl)

+ #  STATUS       Enabled mod_status, a useful module for statistics

+ #  SUEXEC       Enables running CGI scripts (in USERDIR) through suexec.

+ #  USERDIR      Enables /~username mapping to /home/username/public_html

+ #

+ #

+ # The following two options provide the default virtual host for the HTTP and

+ # HTTPS protocol. YOU NEED TO ENABLE AT LEAST ONE OF THEM, otherwise apache

+ # will not listen for incomming connections on the approriate port.

+ #

+ #  DEFAULT_VHOST      Enables name-based virtual hosts, with the default

+ #                     virtual host being in /var/www/localhost/htdocs

+ #  SSL_DEFAULT_VHOST  Enables default vhost for SSL (you should enable this

+ #                     when you enable SSL)

+ #

+ APACHE2_OPTS="-D DEFAULT_VHOST -D LANGUAGE -D INFO"

+ 

+ # Extended options for advanced uses of Apache ONLY

+ # You don't need to edit these unless you are doing crazy Apache stuff

+ # As not having them set correctly, or feeding in an incorrect configuration

+ # via them will result in Apache failing to start

+ # YOU HAVE BEEN WARNED.

+ 

+ # PID file

+ #PIDFILE=/run/httpd/httpd.pid

+ 

+ # timeout for startup/shutdown checks

+ #TIMEOUT=10

+ 

+ # ServerRoot setting

+ #SERVERROOT=/usr/lib/httpd

+ 

+ # Configuration file location

+ # - If this does NOT start with a '/', then it is treated relative to

+ # $SERVERROOT by Apache

+ #CONFIGFILE=/etc/httpd/conf/httpd.conf

+ 

+ # Location to log startup errors to

+ # They are normally dumped to your terminal.

+ #STARTUPERRORLOG="/var/log/httpd/startuperror.log"

+ 

+ # A command that outputs a formatted text version of the HTML at the URL

+ # of the command line. Designed for lynx, however other programs may work.

+ #LYNX="lynx -dump"

+ 

+ # The URL to your server's mod_status status page.

+ # Required for status and fullstatus

+ #STATUSURL="http://localhost/server-status"

+ 

+ # Method to use when reloading the server

+ # Valid options are 'restart' and 'graceful'

+ # See http://httpd.apache.org/docs/2.2/stopping.html for information on

+ # what they do and how they differ.

+ #RELOAD_TYPE="graceful"

@@ -0,0 +1,181 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_commands="configtest modules virtualhosts"

+ extra_started_commands="configdump fullstatus graceful gracefulstop reload"

+ 

+ description_configdump="Dumps the configuration of the runing apache server. Requires server-info to be enabled and www-client/lynx."

+ description_configtest="Run syntax tests for configuration files."

+ description_fullstatus="Gives the full status of the server. Requires lynx and server-status to be enabled."

+ description_graceful="A graceful restart advises the children to exit after the current request and reloads the configuration."

+ description_gracefulstop="A graceful stop advises the children to exit after the current request and stops the server."

+ description_modules="Dump a list of loaded Static and Shared Modules."

+ description_reload="Kills all children and reloads the configuration."

+ description_virtualhosts="Show the settings as parsed from the config file (currently only shows the virtualhost settings)."

+ description_stop="Kills all children and stops the server."

+ 

+ # Apply default values for some conf.d variables.

+ PIDFILE="${PIDFILE:-/run/httpd/httpd.pid}"

+ TIMEOUT=${TIMEOUT:-15}

+ SERVERROOT="${SERVERROOT:-/usr/lib/httpd}"

+ CONFIGFILE="${CONFIGFILE:-/etc/httpd/conf/httpd.conf}"

+ LYNX="${LYNX:-lynx -dump}"

+ STATUSURL="${STATUSURL:-http://localhost/server-status}"

+ RELOAD_TYPE="${RELOAD_TYPE:-graceful}"

+ 

+ # Append the server root and configuration file parameters to the

+ # user's APACHE2_OPTS.

+ APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"

+ APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"

+ 

+ # The path to the apache2 binary.

+ APACHE2="/usr/bin/apachectl"

+ 

+ depend() {

+ 	need net

+ 	use dns entropy logger mysql netmount postgresql

+ 	after sshd

+ }

+ 

+ configtest() {

+ 	ebegin "Checking ${SVCNAME} configuration"

+ 	checkconfig

+ 	eend $?

+ }

+ 

+ checkconfd() {

+ 	if [ ! -d ${SERVERROOT} ]; then

+ 		eerror "SERVERROOT does not exist: ${SERVERROOT}"

+ 		return 1

+ 	fi

+ }

+ 

+ checkconfig() {

+ 	checkpath --directory /run/httpd

+ 	checkconfd || return 1

+ 

+ 	OUTPUT=$( ${APACHE2} ${APACHE2_OPTS} -t 2>&1 )

+ 	ret=$?

+ 	if [ $ret -ne 0 ]; then

+ 		eerror "${SVCNAME} has detected an error in your setup:"

+ 		printf "%s\n" "${OUTPUT}"

+ 	fi

+ 

+ 	return $ret

+ }

+ 

+ start() {

+ 	checkconfig || return 1

+ 

+ 	if [ -n "${STARTUPERRORLOG}" ] ; then

+ 		# We must make sure that we only append to APACHE2_OPTS

+ 		# in start() and not in stop() or anywhere else that may

+ 		# be executed along with start(), see bug #566726.

+ 		APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"

+ 	fi

+ 

+ 	ebegin "Starting ${SVCNAME}"

+ 	# Use start stop daemon to apply system limits #347301 

+ 	start-stop-daemon --start -- ${APACHE2} ${APACHE2_OPTS} -k start

+ 

+ 	local i=0 retval=1

+ 	while [ $i -lt ${TIMEOUT} ] ; do

+ 		if [ -e "${PIDFILE}" ] ; then

+ 			retval=0

+ 			break

+ 		fi

+ 		sleep 1 && i=$(expr $i + 1)

+ 	done

+ 

+ 	eend ${retval}

+ }

+ 

+ stop() {

+ 	if [ "${RC_CMD}" = "restart" ]; then

+ 		checkconfig || return 1

+ 	fi

+ 

+ 	PID=$(cat "${PIDFILE}" 2>/dev/null)

+ 	if [ -z "${PID}" ]; then

+ 		einfo "${SVCNAME} not running (no pid file)"

+ 		return 0

+ 	fi

+ 

+ 	ebegin "Stopping ${SVCNAME}"

+ 	${APACHE2} ${APACHE2_OPTS} -k stop

+ 

+ 	local i=0 retval=0

+ 	while ( test -f "${PIDFILE}" || pgrep -P ${PID} httpd >/dev/null ) \

+ 		&& [ $i -lt ${TIMEOUT} ]; do

+ 		sleep 1 && i=$(expr $i + 1)

+ 	done

+ 	[ -e "${PIDFILE}" ] && retval=1

+ 

+ 	eend ${retval}

+ }

+ 

+ reload() {

+ 	checkconfig || return 1

+ 

+ 	if [ "${RELOAD_TYPE}" = "restart" ]; then

+ 		ebegin "Restarting ${SVCNAME}"

+ 		${APACHE2} ${APACHE2_OPTS} -k restart

+ 		eend $?

+ 	elif [ "${RELOAD_TYPE}" = "graceful" ]; then

+ 		ebegin "Gracefully restarting ${SVCNAME}"

+ 		${APACHE2} ${APACHE2_OPTS} -k graceful

+ 		eend $?

+ 	else

+ 		eerror "${RELOAD_TYPE} is not a valid RELOAD_TYPE. Please edit /etc/conf.d/${SVCNAME}"

+ 	fi

+ }

+ 

+ graceful() {

+ 	checkconfig || return 1

+ 	ebegin "Gracefully restarting ${SVCNAME}"

+ 	${APACHE2} ${APACHE2_OPTS} -k graceful

+ 	eend $?

+ }

+ 

+ gracefulstop() {

+ 	checkconfig || return 1

+ 	ebegin "Gracefully stopping ${SVCNAME}"

+ 	${APACHE2} ${APACHE2_OPTS} -k graceful-stop

+ 	eend $?

+ }

+ 

+ modules() {

+ 	checkconfig || return 1

+ 	${APACHE2} ${APACHE2_OPTS} -M 2>&1

+ }

+ 

+ fullstatus() {

+ 	if ! command -v $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then

+ 		eerror "lynx not found! you need to emerge www-client/lynx"

+ 	else

+ 		${LYNX} ${STATUSURL}

+ 	fi

+ }

+ 

+ virtualhosts() {

+ 	checkconfig || return 1

+ 	${APACHE2} ${APACHE2_OPTS} -S

+ }

+ 

+ configdump() {

+ 	INFOURL="${INFOURL:-http://localhost/server-info}"

+ 

+ 	checkconfd || return 1

+ 

+ 	if ! command -v $(set -- ${LYNX}; echo $1) 2>&1 >/dev/null; then

+ 		eerror "lynx not found! you need to emerge www-client/lynx"

+ 	else

+ 		echo "${APACHE2} started with '${APACHE2_OPTS}'"

+ 		for i in config server list; do

+ 			${LYNX} "${INFOURL}/?${i}" | sed '/Apache Server Information/d;/^[[:space:]]\+[_]\+$/Q'

+ 		done

+ 	fi

+ }

+ 

+ # vim: ts=4 filetype=gentoo-init-d

@@ -0,0 +1,18 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=apparmor-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC apparmor init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'apparmor')

+ conflicts=('systemd-sysvcompat')

+ source=("apparmor.initd")

+ sha512sums=('4912f8ee8f2e0277d85483279bd4a8ee8e25c9a466a080b0c4fe7c778f6215c144712e166d2a46bb05b0f5411ecfd9b5ef57b1141b76df103d3c577bfd9fd315')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/apparmor.initd "${pkgdir}"/etc/init.d/apparmor

+ }

@@ -0,0 +1,91 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2013 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ description="Load all configured profiles for the AppArmor security module."

+ description_reload="Reload all profiles"

+ 

+ extra_started_commands="reload"

+ 

+ aa_action() {

+ 	local arg=$1

+ 	local return

+ 

+ 	shift

+ 	$*

+ 	return=$?

+ 

+ 	if [ ${return} -eq 0 ]; then

+ 		aa_log_success_msg $arg

+ 	else

+ 		aa_log_failure_msg arg

+ 	fi

+ 

+ 	return $return

+ }

+ 

+ aa_log_action_start() {

+ 	ebegin $1

+ }

+ 

+ aa_log_action_end() {

+ 	eend $1

+ }

+ 

+ aa_log_success_msg() {

+ 	einfo $1

+ }

+ 

+ aa_log_warning_msg() {

+ 	ewarn $1

+ }

+ 

+ aa_log_failure_msg() {

+ 	eerror $1

+ }

+ 

+ aa_log_skipped_msg() {

+ 	einfo $1

+ }

+ 

+ aa_log_daemon_msg() {

+ 	einfo $1

+ }

+ 

+ aa_log_end_msg() {

+ 	eend $1

+ }

+ 

+ . /usr/lib/apparmor/rc.apparmor.functions

+ 

+ start() {

+ 	ebegin "Starting AppArmor"

+ 	eindent

+ 

+ 	if ! is_apparmor_loaded ; then

+ 		load_module

+ 		if [ $? -ne 0 ]; then

+ 			eerror "AppArmor kernel support is not present"

+ 			eend 1

+ 			return 1

+ 		fi

+ 	fi

+ 

+ 	parse_profiles load

+ 

+ 	eoutdent

+ }

+ 

+ stop() {

+ 	ebegin "Stopping AppArmor"

+ 	eindent

+ 	apparmor_stop

+ 	eoutdent

+ }

+ 

+ reload() {

+ 	# todo: split out clean_profiles into its own function upstream

+ 	# so we can do parse_profiles reload && clean_profiles

+ 	# and do a proper reload instead of restart

+ 	apparmor_restart

+ }

@@ -0,0 +1,28 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=avahi-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC avahi init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('avahi' 'dbus-openrc')

+ conflicts=('systemd-sysvcompat')

+ source=('avahi-daemon.initd'

+         'avahi-dnsconfd.initd'

+         'autoipd-openrc.sh')

+ sha512sums=('f3a0f8e16efc7f70327349146582a49bdf1645b63407f1334ef16a80102850c1fe466bcfc0ae4b6859155ed296787c60a03bfc69713f30676b2b2a198b743b61'

+             'ad1b6ffb336dd8b653d4fd668b7e61f6f6a06628adbedd4db29b755ae66a369bfddddccdbe2acaf13a1ec7640755db91ab831448aa4395f6a756d9ae76e38334'

+             '83b9753a0a7bfceca975a69a07c31af3d2e8ddd37b9459bb7ec65dea566c48932ea641f789f21c7b5ede48473dc4c0316fce4a9be843ecb05a3b1697aa176ae1')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/avahi-daemon.initd   "${pkgdir}"/etc/init.d/avahi-daemon

+   install -Dm755 "${srcdir}"/avahi-dnsconfd.initd "${pkgdir}"/etc/init.d/avahi-dnsconfd

+ 

+   install -Dm755 autoipd-openrc.sh "${pkgdir}"/usr/lib/netifrc/net/autoipd.sh

+ 

+   sed -e 's|/usr/sbin|/usr/bin|g' -i "${pkgdir}/etc/init.d/avahi-daemon"

+   sed -e 's|/usr/sbin|/usr/bin|g' -i "${pkgdir}/etc/init.d/avahi-dnsconfd"

+ }

@@ -0,0 +1,32 @@ 

+ # Copyright (C) 2004-2008 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ # Contributed by Sven Wegener (swegener@gentoo.org)

+ 

+ _config_vars="$_config_vars autoipd"

+ 

+ autoipd_depend() {

+ 	program /usr/bin/avahi-autoipd

+ 	after interface

+ }

+ 

+ autoipd_start() {

+ 	_exists true || return 1

+ 

+         eval args=\$autoipd_${IFVAR}

+ 

+ 	ebegin "Starting avahi-autoipd"

+ 	/usr/bin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}"

+ 	eend "${?}" || return 1

+ 

+ 	_show_address

+ 

+ 	return 0

+ }

+ 

+ autoipd_stop() {

+ 	/usr/bin/avahi-autoipd --check --syslog "${IFACE}" || return 0

+ 

+ 	ebegin "Stopping avahi-autoipd"

+ 	/usr/bin/avahi-autoipd --kill --syslog "${IFACE}"

+ 	eend "${?}"

+ }

@@ -0,0 +1,31 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2007 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_started_commands="reload"

+ command="/usr/sbin/avahi-daemon"

+ supervisor="supervise-daemon"

+ 

+ depend() {

+ 	before netmount nfsmount

+ 	use net

+ 	need dbus

+ }

+ 

+ # start() {

+ # 	ebegin "Starting avahi-daemon"

+ # 	/usr/bin/avahi-daemon -D

+ # 	eend $?

+ # }

+ #

+ # stop() {

+ # 	ebegin "Stopping avahi-daemon"

+ # 	/usr/bin/avahi-daemon -k

+ # 	eend $?

+ # }

+ 

+ reload() {

+ 	ebegin "Reloading avahi-daemon"

+ 	${command} -r

+ 	eend $?

+ }

@@ -0,0 +1,30 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2007 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_started_commands="reload"

+ supervisor="supervise-daemon"

+ command="/usr/bin/avahi-dnsconfd"

+ 

+ depend() {

+ 	need avahi-daemon

+ 	use net

+ }

+ 

+ # start() {

+ # 	ebegin "Starting avahi-dnsconfd"

+ # 	/usr/bin/avahi-dnsconfd -D

+ # 	eend $?

+ # }

+ #

+ # stop() {

+ # 	ebegin "Stopping avahi-dnsconfd"

+ # 	/usr/bin/avahi-dnsconfd -k

+ # 	eend $?

+ # }

+ 

+ reload() {

+ 	ebegin "Reloading avahi-dnsconfd"

+ 	${command} -r

+ 	eend $?

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=bind-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC bind init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'bind')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/named')

+ source=("named.confd"

+         "named.initd")

+ sha512sums=('68fa7c8963ac59349de3d05972c07aa0123b7bebbe0ba9604463ccfd1b377c2babe01eed4745cbe0f7d3831d1b47c2fa620f8092c67465fb771cae4932b0861a'

+             '0cda69fd663e1847be52d83bfb2749eeffa26b01cbaea5f9e0c9f82d540a13843b1f1f5ad494d29b6aae82ef7ab6c31396bcb4066c33afe2c00e27823cbe7110')

+ 

+ package() {

+     install -Dm755 "${srcdir}"/named.initd "${pkgdir}"/etc/init.d/named

+     install -Dm644 "${srcdir}"/named.confd "${pkgdir}"/etc/conf.d/named

+ }

@@ -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"

@@ -0,0 +1,252 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2014 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_commands="checkconfig checkzones"

+ extra_started_commands="reload"

+ 

+ depend() {

+ 	need net

+ 	use logger

+ 	provide dns

+ }

+ 

+ NAMED_CONF=${CHROOT}/etc/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/bin/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/bin/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/bin/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

+ 

+ 		# On initial startup, if piddir inside the chroot /run/named

+ 		# Then the .../run part might not exist yet

+ 		checkpath -q -d -o root:root -m 0755 "${piddir}/.."

+ 	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}" || {

+ 		eerror "Failed to create PID directory at $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/bin/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/bin/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

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=bitlbee-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC bitlbee init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'bitlbee')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/bitlbee')

+ source=("bitlbee.confd"

+         "bitlbee.initd")

+ sha512sums=('7a16de2bc8616ad5667b9e158f083a83c0a0572afab431c2041d4ff673e60e3f01bc29847b857d89f8559265be4f7741b598e93139bf1ba205c5af91a74c3e55'

+             'b6b449486475396347b3fb9593a4a4aa7ef0780cb448abae0d94887e99964e0b51b2fdbd105c05ad374c5f2699f49e88dcc2682662b77c5bc8441646349e58a6')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/bitlbee.initd "${pkgdir}"/etc/init.d/bitlbee

+   install -Dm644 "${srcdir}"/bitlbee.confd "${pkgdir}"/etc/conf.d/bitlbee

+ }

@@ -0,0 +1,7 @@ 

+ # Bitlbee options (see /usr/bin/bitlbee -h)

+ BITLBEE_OPTS=""

+ 

+ # Specify the network services that correspond to "DaemonInterface" and

+ # "ClientInterface" settings in bitlbee.conf. For example, if bound to 0.0.0.0,

+ # this should be set to "net.lo" which provides the loopback interface.

+ rc_need="net.lo"

@@ -0,0 +1,7 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ command="/usr/bin/bitlbee"

+ pidfile="/run/${RC_SVCNAME}.pid"

+ command_args="-D -P ${pidfile} -u bitlbee ${BITLBEE_OPTS}"

@@ -0,0 +1,18 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=bluez-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC bluez init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('bluez' 'openrc')

+ conflicts=('systemd-sysvcompat')

+ source=("bluetoothd.initd")

+ sha512sums=('f996e18461befb5b6d4435c06a7d7001052af6dcfa41cda2649869ffcaf3b64050af82d11d2d7d41a06803e25bd956e27b5e1c206a6a9364a5d2b2d3291320e6')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/bluetoothd.initd "${pkgdir}"/etc/init.d/bluetoothd

+ }

@@ -0,0 +1,13 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ supervisor="supervise-daemon"

+ #pidfile="/run/bluetoothd.pid"

+ command="/usr/lib/bluetooth/bluetoothd"

+ #command_background=1

+ 

+ depend() {

+     after coldplug

+     need dbus localmount hostname

+ }

@@ -0,0 +1,18 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=brltty-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC brltty init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'brltty')

+ conflicts=('systemd-sysvcompat')

+ source=("brltty.initd")

+ sha512sums=('8c866bc16a99f0c5900d309ab8eb60ffa52b6a943591acfb2955ac09bc1420768cb7079b9afeba03b66c6df94794f33262baa8f002ead58474c390dff64ffa9d')

+ 

+ package() {

+   install -Dm755 "$srcdir"/brltty.initd "$pkgdir"/etc/init.d/brltty

+ }

@@ -0,0 +1,12 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ command=/usr/bin/brltty

+ pidfile=/run/brltty.pid

+ command_args="-P ${pidfile} -q"

+ 

+ depend() {

+ 	before *

+ 	after clock

+ }

@@ -0,0 +1,27 @@ 

+ # Maintainer: Nathan Owens <ndowens@artixlinux.org>

+ 

+ pkgname=chrony-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC chrony init"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'chrony')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/chrony')

+ source=("chrony.confd"

+         "chrony.initd")

+ sha512sums=('1efa02f6b06aabf62bc34aadeb43279d0962987d3836a5b4bf6ecde45cc3d0fc4e6e72c1280171c6f9e3cc87a29638b2b25a926d8e529c26b0fdd66e905c8fbb'

+             '66366f2f7009408f1d5f5427a9a2f0c8221b6a7a8e5ebd53df74282a72e9fd7ce75c01c05d11db38814af3a6d98034dfa5efc967a85ca9655828b58bdf01f1cf')

+ b2sums=('496483539b15a55c15287178b7df730fe33fe8d7ceda164f362c0dd6cd833bbee84a0a0496586489659075fc10aafed0f221fb78d60804ddd9edd24e71f6d49b'

+         '4e8f80b060bcc7f6f3b0d702f1b85387f6e545c31f315232574bf8ebd5ad2a6604a80a994ba629ffe419776a29339d894f0c1c7db78e9cd6fb4dc4761cf2c398')

+ 

+ 

+ package() {

+   install -Dm755 "${srcdir}"/chrony.initd "${pkgdir}"/etc/init.d/chrony

+   install -Dm644 "${srcdir}"/chrony.confd "${pkgdir}"/etc/conf.d/chrony

+ 

+   sed -e 's|/etc/chrony/|/etc/|' -i "${pkgdir}/etc/init.d/chrony"

+ }

@@ -0,0 +1,17 @@ 

+ # /etc/conf.d/chronyd

+ 

+ CFGFILE="/etc/chrony.conf"

+ 

+ # chronyd takes some time to perform a second fork, by enabling this

+ # option chronyd is deamonized through start-stop-daemon(1) thereby

+ # significantly reducing the startup time.

+ FAST_STARTUP=yes

+ 

+ # Configuration dependant options :

+ #      -s - Set system time from RTC if rtcfile directive present

+ #      -r - Reload sample histories if dumponexit directive present

+ #

+ # The combination of "-s -r" allows chronyd to perform long term averaging of

+ # the gain or loss rate across system reboots and shutdowns.

+ 

+ ARGS=""

@@ -0,0 +1,78 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2007 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ # $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/files/chronyd.rc,v 1.8 2007/03/22 14:32:09 tove Exp $

+ 

+ command="/usr/bin/chronyd"

+ description="NTP daemon"

+ pidfile="/run/chrony/chronyd.pid"

+ 

+ depend() {

+ 	need net

+ 	after firewall

+ 	provide ntp-client ntp-server

+ 	use dns

+ }

+ 

+ checkconfig() {

+ 	# Note that /etc/chrony/chrony.keys is *NOT* checked. This

+ 	# is because the user may have specified another key

+ 	# file, and we don't want to force the user to use that

+ 	# exact name for the key file.

+ 	if [ ! -f "${CFGFILE}" ] ; then

+ 		eerror "Please create ${CFGFILE} and the"

+ 		eerror "chrony key file (usually /etc/chrony/chrony.keys)"

+ 		eerror "by using the"

+ 		eerror ""

+ 		eerror "        chrony.conf.example"

+ 		eerror "        chrony.keys.example"

+ 		eerror ""

+ 		eerror "files (from the documentation directory)"

+ 		eerror "as templates."

+ 		return 1

+ 	else

+ 		# Actually, I tried it, and chrony seems to ignore the pidfile

+ 		# option. I'm going to leave it here anyway, since you never

+ 		# know if it might be handy

+ 		_cfg_pidfile=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"`

+ 		if [ -n "$_cfg_pidfile" ] ; then

+ 			pidfile="$_cfg_pidfile"

+ 		fi

+ 	fi

+ 	return 0

+ }

+ 

+ setxtrarg() {

+ 	if [ -c /dev/rtc ]; then

+ 		grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s"

+ 	fi

+ 	grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r"

+ 	return 0

+ }

+ 

+ start() {

+ 	checkconfig || return $?

+ 	setxtrarg

+ 

+ 	local daemon_args=

+ 	if yesno "$FAST_STARTUP"; then

+ 		ARGS="${ARGS} -n"

+ 		daemon_args="--background"

+ 	fi

+ 

+ 	ebegin "Starting chronyd"

+ 	start-stop-daemon $daemon_args --start --quiet \

+ 		--exec "${command}" \

+ 		--pidfile "${pidfile}" \

+ 		-- -f "${CFGFILE}" ${ARGS}

+ 	eend $? "Failed to start chronyd"

+ }

+ 

+ stop() {

+ 	checkconfig || return $?

+ 

+ 	ebegin "Stopping chronyd"

+ 	start-stop-daemon --stop --quiet \

+ 		--pidfile "${pidfile}"

+ 	eend $? "Failed to stop chronyd"

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: Nathan Owens <ndowens @ artixlinux.org>

+ 

+ pkgname=clamav-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="Clamav openrc init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('APACHE')

+ depends=('acpid-openrc' 'clamav')

+ conflicts=('systemd-sysvcompat')

+ source=('clamd.initd'

+         'clamd.confd'

+         'clamd.install')

+ sha512sums=('f7f8bd8db9c31a34afd7b009d11fe5991afba622afaf526c2ae863a135b88b19e12dfd21c27c5eb77bd196f5f5bff55f5a3b00b7ea41ba102687ba54cd6d1353'

+             'b85fd99c80242fb66380dfdef34387a2eff9326a1cb726940ab4bc450308e4942e57d1eb1cad979348f8aac685b53e2fa722cef0dab1f2ea2c958f2a5f818918'

+             '6f0768f396cc2e7f1963340f651b9991004bce9b71311ef47719c9e3b3082c5ddb3137e93460d692323fbe25c4307e92e27e5bdf43d9da1272dd7450a7c2573c')

+ install=clamd.install

+ 

+ package() {

+   install -Dm644 "${srcdir}"/clamd.confd "${pkgdir}"/etc/conf.d/clamd

+   install -Dm755 "${srcdir}"/clamd.initd "${pkgdir}"/etc/init.d/clamd

+ }

@@ -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

@@ -0,0 +1,128 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2013 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ daemon_clamd="/usr/bin/clamd"

+ daemon_freshclam="/usr/bin/freshclam"

+ daemon_milter="/usr/bin/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

+ }

@@ -0,0 +1,12 @@ 

+ post_install() {

+ 	echo " ==> Add Clamav Daemon to system startup wtih 'rc-update add clamd default'"

+ 	echo " ==> Start ClamAv Daemon now with 'rc-service clamd start'"

+ }

+ 

+ post_upgrade() {

+ 	post_install "$1"

+ }

+ 

+ pre_remove() {

+ 	echo " ==> Make sure to 'rc-update del clamd default'"

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=connman-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC connman init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'connman')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/connmand')

+ source=("connmand.confd"

+         "connmand.initd")

+ sha512sums=('ec60993ab2adb47eae53ec4df219629f31f4b857e5e6bb4d775b9334524813b885747d25edc6d179a779506b7da6efe246a0220d4f78ec16d5caa7c7e38e5d4d'

+             'e6a4fe44d4edb8241c971cedc2d2d5799bdb174147a1961b0a037fa56161a83d138816d8934d653b2e19f2dc16a9bbef588fddc699a7cea40b7b1373ffc3240c')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/connmand.initd "${pkgdir}"/etc/init.d/connmand

+   install -Dm644 "${srcdir}"/connmand.confd  "${pkgdir}"/etc/conf.d/connmand

+ }

@@ -0,0 +1,16 @@ 

+ 

+ # conf.d file for connmand

+ #

+ # 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=""

@@ -0,0 +1,12 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2013 Gentoo Foundation

+ # Distributed under the terms of the GNU General Purpose License v2

+ 

+ supervisor=supervise-daemon

+ command=/usr/bin/connmand

+ command_args="-n ${CONNMAN_OPTS}"

+ 

+ depend() {

+    need dbus

+    provide net

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=cpupower-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC cpupower init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'cpupower')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/cpupower')

+ source=("cpupower.confd"

+         "cpupower.initd")

+ sha512sums=('63cd12a4d8782198c71662e9205e346e064b65bae5e3e175b5bc43bdf7ec6ddf675b60349750afe3c37c8a925f9ae9a93530671821342581bd282a69e0773b8c'

+             '6551b3442edf883441169a26d2bcecbfd0f48b53c78d70d8981c5d704b5593003704648ca06cdac14beebd21e411b89decedf5feaa902e0b14029ac990dbc32f')

+ 

+ package() {

+   install -Dm755 "${srcdir}/cpupower.initd" "${pkgdir}/etc/init.d/cpupower"

+   install -Dm644 "${srcdir}/cpupower.confd" "${pkgdir}/etc/conf.d/cpupower"

+ }

@@ -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"

@@ -0,0 +1,41 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2013 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ 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}"

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=cryptsetup-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC cryptsetup init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('device-mapper-openrc' 'cryptsetup')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/dmcrypt')

+ source=("dmcrypt.confd"

+         "dmcrypt.initd")

+ sha512sums=('131cee054019eed3f1939615386ba849bad2b02e31042075d5839e9a5943c8716431aae01aece25b2193645bcd706e14e6c947ee59f1fab4c2d7e0afc80228be'

+             '50754791a9e1b96e59b0de7b7c6f5137197ffda668896f42abe2ae6df59585493ab4694f5b73b46479bcecfd64ff1d3ae4cecba2a369b733f1724a94fed4ba01')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/dmcrypt.initd "${pkgdir}"/etc/init.d/dmcrypt

+   install -Dm644 "${srcdir}"/dmcrypt.confd "${pkgdir}"/etc/conf.d/dmcrypt

+ }

@@ -0,0 +1,112 @@ 

+ # /etc/conf.d/dmcrypt

+ 

+ # For people who run dmcrypt on top of some other layer (like raid),

+ # use rc_need to specify that requirement.  See the runscript(8) man

+ # page for more information.

+ 

+ #--------------------

+ # Instructions

+ #--------------------

+ 

+ # Note regarding the syntax of this file.  This file is *almost* bash,

+ # but each line is evaluated separately.  Separate swaps/targets can be

+ # specified.  The init-script which reads this file assumes that a

+ # swap= or target= line starts a new section, similar to lilo or grub

+ # configuration.

+ 

+ # Note when using gpg keys and /usr on a separate partition, you will

+ # have to copy /usr/bin/gpg to /bin/gpg so that it will work properly

+ # and ensure that gpg has been compiled statically.

+ # See http://bugs.gentoo.org/90482 for more information.

+ 

+ # Note that the init-script which reads this file detects whether your

+ # partition is LUKS or not. No mkfs is run unless you specify a makefs

+ # option.

+ 

+ # Global options:

+ #----------------

+ 

+ # How long to wait for each timeout (in seconds).

+ dmcrypt_key_timeout=1

+ 

+ # Max number of checks to perform (see dmcrypt_key_timeout).

+ #dmcrypt_max_timeout=300

+ 

+ # Number of password retries.

+ dmcrypt_retries=5

+ 

+ # Arguments:

+ #-----------

+ # target=<name>                      == Mapping name for partition.

+ # swap=<name>                        == Mapping name for swap partition.

+ # source='<dev>'                     == Real device for partition.

+ #                                    Note: You can (and should) specify a tag like UUID

+ #                                    for blkid (see -t option).  This is safer than using

+ #                                    the full path to the device.

+ # key='</path/to/keyfile>[:<mode>]'  == Fullpath from / or from inside removable media.

+ # remdev='<dev>'                     == Device that will be assigned to removable media.

+ # gpg_options='<opts>'               == Default are --quiet --decrypt

+ # options='<opts>'                   == cryptsetup, for LUKS you can only use --readonly

+ # loop_file='<file>'                 == Loopback file.

+ #                                    Note: If you omit $source, then a free loopback will

+ #                                    be looked up automatically.

+ # pre_mount='cmds'                   == commands to execute before mounting partition.

+ # post_mount='cmds'                  == commands to execute after mounting partition.

+ # wait=5                             == wait given amount of seconds for source to appear

+ #-----------

+ # Supported Modes

+ # gpg					== decrypt and pipe key into cryptsetup.

+ #						Note: new-line character must not be part of key.

+ #						Command to erase \n char: 'cat key | tr -d '\n' > cleanKey'

+ 

+ #--------------------

+ # dm-crypt examples

+ #--------------------

+ 

+ ## swap

+ # Swap partitions. These should come first so that no keys make their

+ # way into unencrypted swap.

+ # If no options are given, they will default to: -c aes -h sha1 -d /dev/urandom

+ # If no makefs is given then mkswap will be assumed

+ #swap=crypt-swap

+ #source='/dev/hda2'

+ 

+ ## /home with passphrase

+ #target=crypt-home

+ #source='/dev/hda5'

+ 

+ ## /home with regular keyfile

+ #target=crypt-home

+ #source='/dev/hda5'

+ #key='/full/path/to/homekey'

+ 

+ ## /home with gpg protected key

+ #target=crypt-home

+ #source='/dev/hda5'

+ #key='/full/path/to/homekey:gpg'

+ 

+ ## /home with regular keyfile on removable media(such as usb-stick)

+ #target=crypt-home

+ #source='/dev/hda5'

+ #key='/full/path/to/homekey'

+ #remdev='/dev/sda1'

+ 

+ ## /home with gpg protected key on removable media(such as usb-stick)

+ #target=crypt-home

+ #source='/dev/hda5'

+ #key='/full/path/to/homekey:gpg'

+ #remdev='/dev/sda1'

+ 

+ ## /tmp with regular keyfile

+ #target=crypt-tmp

+ #source='/dev/hda6'

+ #key='/full/path/to/tmpkey'

+ #pre_mount='/sbin/mkreiserfs -f -f ${dev}'

+ #post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}'

+ 

+ ## Loopback file example

+ #target='crypt-loop-home'

+ #source='/dev/loop0'

+ #loop_file='/mnt/crypt/home'

+ 

+ # The file must be terminated by a newline.  Or leave this comment last.

@@ -0,0 +1,350 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2015 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ depend() {

+ 	use modules

+ 	before checkfs fsck

+ 

+ 	if grep -qs ^swap= "${conf_file}" ; then

+ 		before swap

+ 	fi

+ }

+ 

+ # We support multiple dmcrypt instances based on $SVCNAME

+ conf_file="/etc/conf.d/${SVCNAME}"

+ 

+ # Get splash helpers if available.

+ if [ -e /usr/bin/splash-functions.sh ] ; then

+ 	. /usr/bin/splash-functions.sh

+ fi

+ 

+ # Setup mappings for an individual target/swap

+ # Note: This relies on variables localized in the main body below.

+ dm_crypt_execute() {

+ 	local dev ret mode foo source_dev

+ 

+ 	if [ -z "${target}" -a -z "${swap}" ] ; then

+ 		return

+ 	fi

+ 

+ 	# Set up default values.

+ 	: ${dmcrypt_key_timeout:=1}

+ 	: ${dmcrypt_max_timeout:=300}

+ 	: ${dmcrypt_retries:=5}

+ 	: ${wait:=5}

+ 

+ 	# Handle automatic look up of the source path.

+ 	if [ -z "${source}" -a -n "${loop_file}" ] ; then

+ 		source=$(losetup --show -f "${loop_file}")

+ 	fi

+ 	case ${source} in

+ 	*=*)

+ 		i=0

+ 		while [ ${i} -lt ${wait} ]; do

+ 			if source_dev="$(blkid -l -t "${source}" -o device)"; then

+ 				source="${source_dev}"

+ 				break

+ 			fi

+ 			: $((i += 1))

+ 			einfo "waiting for source \"${source}\" for ${target}..."

+ 			sleep 1

+ 		done

+ 		;;

+ 	esac

+ 	if [ -z "${source}" ] || [ ! -e "${source}" ] ; then

+ 		ewarn "source \"${source}\" for ${target} missing, skipping..."

+ 		return

+ 	fi

+ 

+ 	if [ -n "${target}" ] ; then

+ 		# let user set options, otherwise leave empty

+ 		: ${options:=' '}

+ 	elif [ -n "${swap}" ] ; then

+ 		if cryptsetup isLuks ${source} 2>/dev/null ; then

+ 			ewarn "The swap you have defined is a LUKS partition. Aborting crypt-swap setup."

+ 			return

+ 		fi

+ 		target=${swap}

+ 		# swap contents do not need to be preserved between boots, luks not required.

+ 		# suspend2 users should have initramfs's init handling their swap partition either way.

+ 		: ${options:='-c aes -h sha1 -d /dev/urandom'}

+ 		: ${pre_mount:='mkswap ${dev}'}

+ 	fi

+ 

+ 	if [ -n "${loop_file}" ] ; then

+ 		dev="/dev/mapper/${target}"

+ 		ebegin "  Setting up loop device ${source}"

+ 		losetup ${source} ${loop_file}

+ 	fi

+ 

+ 	# cryptsetup:

+ 	# open   <device> <name>      # <device> is $source

+ 	# create <name>   <device>    # <name>   is $target

+ 	local arg1="create" arg2="${target}" arg3="${source}"

+ 	if cryptsetup isLuks ${source} 2>/dev/null ; then

+ 		arg1="open"

+ 		arg2="${source}"

+ 		arg3="${target}"

+ 	fi

+ 

+ 	# Older versions reported:

+ 	#	${target} is active:

+ 	# Newer versions report:

+ 	#	${target} is active[ and is in use.]

+ 	if cryptsetup status ${target} | egrep -q ' is active' ; then

+ 		einfo "dm-crypt mapping ${target} is already configured"

+ 		return

+ 	fi

+ 	splash svc_input_begin ${SVCNAME} >/dev/null 2>&1

+ 

+ 	# Handle keys

+ 	if [ -n "${key}" ] ; then

+ 		read_abort() {

+ 			# some colors

+ 			local ans savetty resettty

+ 			[ -z "${NORMAL}" ] && eval $(eval_ecolors)

+ 			einfon "  $1? (${WARN}yes${NORMAL}/${GOOD}No${NORMAL}) "

+ 			shift

+ 			# This is ugly as s**t.  But POSIX doesn't provide `read -t`, so

+ 			# we end up having to implement our own crap with stty/etc...

+ 			savetty=$(stty -g)

+ 			resettty='stty ${savetty}; trap - EXIT HUP INT TERM'

+ 			trap 'eval "${resettty}"' EXIT HUP INT TERM

+ 			stty -icanon

+ 			stty min 0 time "$(( $2 * 10 ))"

+ 			ans=$(dd count=1 bs=1 2>/dev/null) || ans=''

+ 			eval "${resettty}"

+ 			if [ -z "${ans}" ] ; then

+ 				printf '\r'

+ 			else

+ 				echo

+ 			fi

+ 			case ${ans} in

+ 				[yY]) return 0;;

+ 				*) return 1;;

+ 			esac

+ 		}

+ 

+ 		# Notes: sed not used to avoid case where /usr partition is encrypted.

+ 		mode=${key##*:} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" ] ) && mode=reg

+ 		key=${key%:*}

+ 		case "${mode}" in

+ 		gpg|reg)

+ 			# handle key on removable device

+ 			if [ -n "${remdev}" ] ; then

+ 				# temp directory to mount removable device

+ 				local mntrem="${RC_SVCDIR}/dm-crypt-remdev.$$"

+ 				if [ ! -d "${mntrem}" ] ; then

+ 					if ! mkdir -p "${mntrem}" ; then

+ 						ewarn "${source} will not be decrypted ..."

+ 						einfo "Reason: Unable to create temporary mount point '${mntrem}'"

+ 						return

+ 					fi

+ 				fi

+ 				i=0

+ 				einfo "Please insert removable device for ${target}"

+ 				while [ ${i} -lt ${dmcrypt_max_timeout} ] ; do

+ 					foo=""

+ 					if mount -n -o ro "${remdev}" "${mntrem}" 2>/dev/null >/dev/null ; then

+ 						# keyfile exists?

+ 						if [ ! -e "${mntrem}${key}" ] ; then

+ 							umount -n "${mntrem}"

+ 							rmdir "${mntrem}"

+ 							einfo "Cannot find ${key} on removable media."

+ 							read_abort "Abort" ${dmcrypt_key_timeout} && return

+ 						else

+ 							key="${mntrem}${key}"

+ 							break

+ 						fi

+ 					else

+ 						[ -e "${remdev}" ] \

+ 							&& foo="mount failed" \

+ 							|| foo="mount source not found"

+ 					fi

+ 					: $((i += 1))

+ 					read_abort "Stop waiting after $i attempts (${foo})" -t 1 && return

+ 				done

+ 			else    # keyfile ! on removable device

+ 				if [ ! -e "${key}" ] ; then

+ 					ewarn "${source} will not be decrypted ..."

+ 					einfo "Reason: keyfile ${key} does not exist."

+ 					return

+ 				fi

+ 			fi

+ 			;;

+ 		*)

+ 			ewarn "${source} will not be decrypted ..."

+ 			einfo "Reason: mode ${mode} is invalid."

+ 			return

+ 			;;

+ 		esac

+ 	else

+ 		mode=none

+ 	fi

+ 	ebegin "  ${target} using: ${options} ${arg1} ${arg2} ${arg3}"

+ 	if [ "${mode}" = "gpg" ] ; then

+ 		: ${gpg_options:='-q -d'}

+ 		# gpg available ?

+ 		if command -v gpg >/dev/null ; then

+ 			i=0

+ 			while [ ${i} -lt ${dmcrypt_retries} ] ; do

+ 				# paranoid, don't store key in a variable, pipe it so it stays very little in ram unprotected.

+ 				# save stdin stdout stderr "values"

+ 				timeout ${dmcrypt_max_timeout} gpg ${gpg_options} ${key} 2>/dev/null | \

+ 					cryptsetup --key-file - ${options} ${arg1} ${arg2} ${arg3}

+ 				ret=$?

+ 				# The timeout command exits 124 when it times out.

+ 				[ ${ret} -eq 0 -o ${ret} -eq 124 ] && break

+ 				: $(( i += 1 ))

+ 			done

+ 			eend ${ret} "failure running cryptsetup"

+ 		else

+ 			ewarn "${source} will not be decrypted ..."

+ 			einfo "Reason: cannot find gpg application."

+ 			einfo "You have to install app-crypt/gnupg first."

+ 			einfo "If you have /usr on its own partition, try copying gpg to /bin ."

+ 		fi

+ 	else

+ 		if [ "${mode}" = "reg" ] ; then

+ 			cryptsetup ${options} -d ${key} ${arg1} ${arg2} ${arg3}

+ 			ret=$?

+ 			eend ${ret} "failure running cryptsetup"

+ 		else

+ 			cryptsetup ${options} ${arg1} ${arg2} ${arg3}

+ 			ret=$?

+ 			eend ${ret} "failure running cryptsetup"

+ 		fi

+ 	fi

+ 	if [ -d "${mntrem}" ] ; then

+ 		umount -n ${mntrem} 2>/dev/null >/dev/null

+ 		rmdir ${mntrem} 2>/dev/null >/dev/null

+ 	fi

+ 	splash svc_input_end ${SVCNAME} >/dev/null 2>&1

+ 

+ 	if [ ${ret} -ne 0 ] ; then

+ 		cryptfs_status=1

+ 	else

+ 		if [ -n "${pre_mount}" ] ; then

+ 			dev="/dev/mapper/${target}"

+ 			eval ebegin \""    pre_mount: ${pre_mount}"\"

+ 			eval "${pre_mount}" > /dev/null

+ 			ewend $? || cryptfs_status=1

+ 		fi

+ 	fi

+ }

+ 

+ # Lookup optional bootparams

+ get_bootparam_val() {

+ 	# We're given something like:

+ 	#    foo=bar=cow

+ 	# Return the "bar=cow" part.

+ 	case $1 in

+ 	*=*)

+ 		echo "${1#*=}"

+ 		;;

+ 	esac

+ }

+ 

+ start() {

+ 	local header=true cryptfs_status=0

+ 	local gpg_options key loop_file target targetline options pre_mount post_mount source swap remdev

+ 

+ 	local x

+ 	for x in $(cat /proc/cmdline) ; do

+ 		case "${x}" in

+ 		key_timeout=*)

+ 			dmcrypt_key_timeout=$(get_bootparam_val "${x}")

+ 			;;

+ 		esac

+ 	done

+ 

+ 	while read targetline <&3 ; do

+ 		case ${targetline} in

+ 		# skip comments and blank lines

+ 		""|"#"*) continue ;;

+ 		# skip service-specific openrc configs #377927

+ 		rc_*) continue ;;

+ 		esac

+ 

+ 		${header} && ebegin "Setting up dm-crypt mappings"

+ 		header=false

+ 

+ 		# check for the start of a new target/swap

+ 		case ${targetline} in

+ 		target=*|swap=*)

+ 			# If we have a target queued up, then execute it

+ 			dm_crypt_execute

+ 

+ 			# Prepare for the next target/swap by resetting variables

+ 			unset gpg_options key loop_file target options pre_mount post_mount source swap remdev wait

+ 			;;

+ 

+ 		gpg_options=*|remdev=*|key=*|loop_file=*|options=*|pre_mount=*|post_mount=*|wait=*|source=*)

+ 			if [ -z "${target}${swap}" ] ; then

+ 				ewarn "Ignoring setting outside target/swap section: ${targetline}"

+ 				continue

+ 			fi

+ 			;;

+ 

+ 		dmcrypt_*=*)

+ 			# ignore global options

+ 			continue

+ 			;;

+ 

+ 		*)

+ 			ewarn "Skipping invalid line in ${conf_file}: ${targetline}"

+ 			;;

+ 		esac

+ 

+ 		# Queue this setting for the next call to dm_crypt_execute

+ 		eval "${targetline}"

+ 	done 3< ${conf_file}

+ 

+ 	# If we have a target queued up, then execute it

+ 	dm_crypt_execute

+ 

+ 	ewend ${cryptfs_status} "Failed to setup dm-crypt devices"

+ }

+ 

+ stop() {

+ 	local line header

+ 

+ 	# Break down all mappings

+ 	header=true

+ 	egrep "^(target|swap)=" ${conf_file} | \

+ 	while read line ; do

+ 		${header} && einfo "Removing dm-crypt mappings"

+ 		header=false

+ 

+ 		target= swap=

+ 		eval ${line}

+ 

+ 		[ -n "${swap}" ] && target=${swap}

+ 		if [ -z "${target}" ] ; then

+ 			ewarn "invalid line in ${conf_file}: ${line}"

+ 			continue

+ 		fi

+ 

+ 		ebegin "  ${target}"

+ 		cryptsetup remove ${target}

+ 		eend $?

+ 	done

+ 

+ 	# Break down loop devices

+ 	header=true

+ 	grep '^source=./dev/loop' ${conf_file} | \

+ 	while read line ; do

+ 		${header} && einfo "Detaching dm-crypt loop devices"

+ 		header=false

+ 

+ 		source=

+ 		eval ${line}

+ 

+ 		ebegin "  ${source}"

+ 		losetup -d "${source}"

+ 		eend $?

+ 	done

+ 

+ 	return 0

+ }

@@ -0,0 +1,19 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=cups-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC cups init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('cups' 'dbus-openrc' 'openrc')

+ optdepends=('avahi-openrc: avahi initscript')

+ conflicts=('systemd-sysvcompat')

+ source=("cupsd.initd")

+ sha512sums=('44bc2419a5e3e25f4c7e47a671c3edfec7ecc1c520a7f8c7040dc278821fa6876404161f10ff514c1de3e478626e3124e6fe8c5e4a334f25e3f1dca7526a4dca')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/cupsd.initd "${pkgdir}"/etc/init.d/cupsd

+ }

@@ -0,0 +1,23 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2017 Gentoo Foundation

+ 

+ supervisor="supervise-daemon"

+ description="The Common Unix Printing System daemon"

+ command="/usr/bin/cupsd"

+ command_args="-f -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf"

+ #pidfile="/run/cupsd.pid"

+ #start_stop_daemon_args="-b -m --pidfile ${pidfile}"

+ 

+ depend() {

+ 	use net

+ 	need dbus avahi-daemon

+ 	before nfs

+ 	after logger

+ }

+ 

+ start_pre() {

+ 	checkpath -q -d -m 0775 -o root:cups /var/cache/cups

+ 	checkpath -q -d -m 0775 -o root:cups /var/cache/cups/rss

+ 	checkpath -q -d -m 0755 -o root:cups /run/cups

+ 	checkpath -q -d -m 0511 -o daemon:sys /run/cups/certs

+ }

@@ -0,0 +1,18 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=cyrus-sasl-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC cyrus-sasl init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'cyrus-sasl')

+ conflicts=('systemd-sysvcompat')

+ source=("saslauthd.initd")

+ sha512sums=('cd11259770b94574ac9ff0175f113c4677ce980b5802a8d832a755b827f653fa8a8bec82bed1543c0e069e389892168203f46709a3fc476c7ccb6c22b35987dc')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/saslauthd.initd "${pkgdir}"/etc/init.d/saslauthd

+ }

@@ -0,0 +1,19 @@ 

+ # Config file for /etc/init.d/saslauthd

+ 

+ # PLEASE READ THIS IF YOU ARE USING SYSTEMD

+ # Please note that systemd does not expand shell variables

+ # thus, something like FOO="${FOO} bar" won't work.

+ 

+ # Specify the authentications mechanism.

+ # **NOTE** For a list see: saslauthd -v

+ # Since 2.1.19, add "-r" to options for old behavior,

+ # ie. reassemble user and realm to user@realm form.

+ #

+ # Specify the hostname for remote IMAP server using:

+ # "-O localhost".

+ # Specify the number of worker processes to create using:

+ # "-n <N>".

+ # Enable credential cache, set cache size and timeout using:

+ # "-c -s <cache size, like 128> -t <timeout seconds>".

+ # 

+ SASLAUTHD_OPTS="-a pam"

@@ -0,0 +1,10 @@ 

+ #!/usr/bin/openrc-run

+ 

+ pidfile=/run/saslauthd/saslauthd.pid

+ command=/usr/bin/saslauthd

+ command_args="${SASLAUTHD_OPTS}"

+ command_background=yes

+ 

+ depend() {

+ 	need net

+ }

@@ -0,0 +1,27 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=device-mapper-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC device-mapper init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('device-mapper' 'openrc')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/device-mapper')

+ source=("device-mapper.confd"

+         "device-mapper.initd"

+         "dmeventd.initd")

+ sha512sums=('1846e0ca1be7170d4c0beb694a23aea4d19b24b99a248bb0f4e034286a6beede0a8efc474b0c237e33ee72c86c93b6238f2d5ea23e224765acba99c90633261e'

+             'f2b0722d2b3a27260b8b5a83579912070038b2d4d0c3b6ffa60d9aac21b4a43b18a6a54ff2bc405dcf84ff491c587ec30f861b6c537b1ded9643f937ec8188bf'

+             '49eb77084e2510ced7d96d90af95bd02cfe9d9b75655cb3f9e9fe385072656eacc634148103dc1d1c7da0885ec5298282dd35f66574d2babc8a41363e85b8618')

+ 

+ package() {

+   install -Dm644 "${srcdir}"/device-mapper.confd "${pkgdir}"/etc/conf.d/device-mapper

+ 

+   for f in device-mapper dmeventd; do

+     install -Dm755 "${srcdir}"/"$f".initd "${pkgdir}"/etc/init.d/"$f"

+   done

+ }

@@ -0,0 +1,1 @@ 

+ RC_AFTER="lvm"

@@ -0,0 +1,146 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ depend() {

+ 	# As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that

+ 	# means dmeventd is NOT notified, as it cannot be safely running

+ 	before dmeventd checkfs fsck

+ 	after modules

+ }

+ 

+ dm_in_proc() {

+ 	local retval=0

+ 	for x in devices misc ; do

+ 		grep -qs 'device-mapper' /proc/${x}

+ 		retval=$((${retval} + $?))

+ 	done

+ 	return ${retval}

+ }

+ 

+ # char **build_dmsetup_command(volume)

+ #

+ # Returns complete dmsetup command given single volume name

+ build_dmsetup_command() {

+ 	local count dmsetup_cmd

+ 

+ 	# Number of lines mentioning volume name

+ 	count=$(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | grep -c ${1})

+ 

+ 	# If there's just one line:

+ 	if [ ${count} -eq 1 ] ; then

+ 		echo "echo $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \

+ 			  grep ${1} | awk '{$1=""; print $0}') | /usr/bin/dmsetup create ${1}"

+ 

+ 	# For all cases with more lines:

+ 	elif [ ${count} -gt 1 ] ; then

+ 		for c in $( seq 1 ${count} ) ; do

+ 			if [ ${c} -eq 1 ] ; then

+ 				# Heavy escaping in awk-statement because we cannot use apostrophes

+ 				dmsetup_cmd="echo -e $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \

+ 							 grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"

+ 			else

+ 				# Append starting with newline

+ 				dmsetup_cmd="${dmsetup_cmd}\\\\n \

+ 							 $(grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \

+ 							 grep ${1} | awk NR==${c}\ \{\$1=\"\"\;\ print\ \$0\})"

+ 			fi

+ 		done

+ 		echo "${dmsetup_cmd} | /usr/bin/dmsetup create ${1}"

+ 	fi

+ 

+ 	return 0

+ }

+ 

+ # char **get_new_dm_volumes(void)

+ #

+ #   Return unique volumes from /etc/dmtab

+ get_new_dm_volumes() {

+ 	local volume

+ 

+ 	# Filter comments and blank lines

+ 	grep -v -e '^[[:space:]]*\(#\|$\)' /etc/dmtab | \

+ 	awk '{ print $1 }' | \

+ 	uniq | \

+ 	while read volume ; do

+ 		# If it exists, skip it

+ 		dmvolume_exists "${volume%:}" && continue

+ 

+ 		echo "${volume%:}"

+ 	done

+ 

+ 	return 0

+ }

+ 

+ # int dmvolume_exists(volume)

+ #

+ #   Return true if volume exists in DM table

+ dmvolume_exists() {

+ 	local x line volume=$1

+ 

+ 	[ -z "${volume}" ] && return 1

+ 

+ 	/usr/bin/dmsetup ls 2>/dev/null | \

+ 	while read line ; do

+ 		for x in ${line} ; do

+ 			# the following conditonal return only breaks out

+ 			# of the while loop, as it is running in a pipe.

+ 			[ "${x}" = "${volume}" ] && return 1

+ 			# We only want to check the volume name

+ 			break

+ 		done

+ 	done

+ 

+ 	# if 1 was returned from the above loop, then indicate that

+ 	# volume exists

+ 	[ $? = 1 ] && return 0

+ 

+ 	# otherwise the loop exited normally and the volume does not

+ 	# exist

+ 	return 1

+ }

+ 

+ # int is_empty_dm_volume(volume)

+ #

+ #   Return true if the volume exists in DM table, but is empty/non-valid

+ is_empty_dm_volume() {

+ 	local table volume=$1

+ 

+ 	set -- $(/usr/bin/dmsetup table 2>/dev/null | grep -e "^${volume}:")

+ 	[ "${volume}" = "$1" -a -z "$2" ]

+ }

+ 

+ 

+ start() {

+ 	if [ -e /proc/modules ] && ! dm_in_proc ; then

+ 		modprobe dm-mod 2>/dev/null

+ 	fi

+ 	# Ensure the dirs exist for locking and running

+ 	checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm

+ 

+ 	local x volume

+ 

+ 	if [ -x /usr/bin/dmsetup -a -c /dev/mapper/control -a -f /etc/dmtab ] ; then

+ 		[ -n "$(get_new_dm_volumes)" ] && \

+ 			einfo " Setting up device-mapper volumes:"

+ 

+ 		get_new_dm_volumes | \

+ 		while read x ; do

+ 			[ -n "${x}" ] || continue

+ 

+ 			volume="${x##* }"

+ 

+ 			ebegin "  Creating volume: ${volume}"

+ 			if ! eval $(build_dmsetup_command ${volume}) >/dev/null 2>/dev/null ; then

+ 				eend 1 "  Error creating volume: ${volume}"

+ 				# dmsetup still adds an empty volume in some cases,

+ 				#  so lets remove it

+ 				is_empty_dm_volume "${volume}" && \

+ 					/usr/bin/dmsetup remove "${volume}" 2>/dev/null

+ 			else

+ 				eend 0

+ 			fi

+ 		done

+ 	fi

+ }

+ 

@@ -0,0 +1,25 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ PIDFILE=/run/dmeventd.pid

+ BIN=/usr/bin/dmeventd

+ 

+ depend() {

+ 	# As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that

+ 	# means dmeventd is NOT notified, as it cannot be safely running

+ 	after lvm device-mapper

+ }

+ 

+ start() {

+ 	ebegin "Starting dmeventd"

+ 	start-stop-daemon --start --exec $BIN --pidfile $PIDFILE

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping dmeventd"

+ 	start-stop-daemon --stop --exec $BIN --pidfile $PIDFILE

+ 	eend $?

+ }

+ 

@@ -0,0 +1,37 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=dhcp-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC dhcp init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'dhcp')

+ optdepends=('openldap-openrc: openldap initscript'

+             'bind-openrc: bind initscript')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/dhcpd'

+         'etc/conf.d/dhcrelay'

+         'etc/conf.d/dhcrelay6')

+ source=("dhcpd.confd"

+         "dhcrelay.confd"

+         "dhcrelay6.confd"

+         "dhcpd.initd"

+         "dhcrelay.initd")

+ sha512sums=('7b7a77b7826b475a4113ebeee54501ce417cc56e85754301a82a185d88b4713d198f615a366e63e0e2b0aef988c8137dcd1e18c4036d993378257079da17693d'

+             'af94d679c5b7652a770d4acb96f5f12fd9dc99f4e8e26b10fab67514693f63392bc8033a6e5e6c1967d7004decc72b810462e1fe92c1d4808606e48086dea00b'

+             '40d3a6bdf8521bf5152cf31b961aea88b2fb0339433d0b6a6360a16c796298620b377bd079c0246e97bc9c0533ddb13bbb58cc5169d0ca598e3a51d1a607a9e9'

+             '195e18afb1d5db62d4eb3fa374e82e343491dcaa0bb76526d182ed74929c636c6c8a88a20c12c50e2e8c8920a0789499d187d432723195776ea72b11351d9bb1'

+             'aabab38279e09580be2d1ecd5556752dba1de447db0bd79113c26ec76cc63fcb0d5fce758c67074f5c9dbda8a09bab788f59d693f9d479137df042dce73c4843')

+ 

+ package() {

+   for f in dhcpd dhcrelay; do

+     install -Dm755 "${srcdir}/$f".initd "${pkgdir}"/etc/init.d/"$f"

+     install -Dm644 "${srcdir}/$f".confd "${pkgdir}"/etc/conf.d/"$f"

+   done

+ 

+   install -Dm644 "${srcdir}"/dhcrelay6.confd "${pkgdir}"/etc/conf.d/dhcrelay6

+   install -Dm755 "${srcdir}"/dhcrelay.initd "${pkgdir}"/etc/init.d/dhcrelay6

+ }

@@ -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=""

@@ -0,0 +1,119 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2015 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_commands="configtest"

+ 

+ : ${DHCPD_CONF:=/etc/dhcpd.conf}

+ 

+ depend() {

+ 	need net

+ 	use logger dns ldap slapd

+ }

+ 

+ get_var() {

+ 	local var="$(sed -n 's/^[[:blank:]]\?'"$1"' "*\([^#";]\+\).*/\1/p' "${chroot}${DHCPD_CONF}")"

+ 	echo ${var:-$2}

+ }

+ 

+ setup_opts() {

+ 	DHCPD_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

+ }

+ 

+ checkconfig() {

+ 	set -- ${DHCPD_OPTS} -chroot "${DHCPD_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() {

+ 	setup_opts

+ 

+ 	ebegin "Checking ${SVCNAME} configuration"

+ 	checkconfig

+ 	eend $?

+ }

+ 

+ start() {

+ 	setup_opts

+ 	local chroot="${DHCPD_CHROOT}"

+ 

+ 	if [ -n "${chroot}" ] ; then

+ 		# the config test want's these to exist

+ 		mkdir -p \

+ 			"${chroot}"/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}"/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 /run/dhcp/${SVCNAME}.pid)"

+ 

+ 	ebegin "Starting ${chroot:+chrooted }${SVCNAME}"

+ 	start-stop-daemon --start --exec /usr/bin/dhcpd \

+ 		--pidfile "${chroot}/${pidfile}" \

+ 		-- ${DHCPD_OPTS} -q -pf "${pidfile}" -lf "${leasefile}" \

+ 		-user dhcp -group dhcp \

+ 		-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/bin/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}

+ }

@@ -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=""

@@ -0,0 +1,33 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2012 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ depend() {

+ 	need net

+ 	use logger ldap slapd

+ }

+ 

+ start() {

+ 	if [ -z "${DHCRELAY_SERVERS}" ] ; then

+ 		eerror "No DHCRELAY_SERVERS specified in /etc/conf.d/${SVCNAME}"

+ 		return 1

+ 	fi

+ 

+ 	checkpath -d /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/bin/dhcrelay \

+ 		-- -q ${iface_opts} ${DHCRELAY_OPTS} ${DHCRELAY_SERVERS}

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping ${SVCNAME}"

+ 	start-stop-daemon --stop --pidfile /run/dhcp/${SVCNAME}.pid

+ 	eend $?

+ }

@@ -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=""

@@ -0,0 +1,18 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=dhcpcd-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC dhcpcd init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'dhcpcd')

+ conflicts=('systemd-sysvcompat')

+ source=("dhcpcd.initd")

+ sha512sums=('5d2624b35fa69a3a1a64662c0d77b3d483e1213e10ec57f70ad9668e9c4518fbe2574a9d9ca4e9246943811e06e81affd108887d9b8f8c8c16f9e234a010a0d6')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/dhcpcd.initd "${pkgdir}"/etc/init.d/dhcpcd

+ }

@@ -0,0 +1,19 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 2007-2020 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ command=/usr/bin/dhcpcd

+ pidfile=/run/dhcpcd/pid

+ supervisor="supervise-daemon"

+ command_args_foreground="--nobackground"

+ command_args=-q

+ name="DHCP Client Daemon"

+ 

+ depend()

+ {

+ 	provide net

+ 	need localmount

+ 	use logger network

+ 	after bootmisc modules

+ 	before dns

+ }

@@ -0,0 +1,30 @@ 

+ 

+ pkgname=displaymanager-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgrel+=.nonsystemd1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC display manager init script"

+ arch=('any')

+ license=('GPL2')

+ depends=('openrc' 'xorg-server' 'xorg-xinit')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/xdm')

+ install=displaymanager.install

+ source=("xdm.confd"

+         "xdm.initd"

+ 	"xdm-setup.initd"

+ 	"startDM.sh")

+ sha512sums=('7c40f910a8b1eae833fd04cba4f4c7b602bd9733c543c1311c71a47a7e66c1a38ba6472f6ee2becaac5aa9c0981da83342347c26f25747212995d9501ed55cf4'

+             '4597fb3b19dbe2944c0ad3a1d4d5f2f9aa8eac8f80094bfbcbe3b0e7aff73170d054fd997008442a784ecd18dbc5813166662a99277f4ac639bb01db39893883'

+             '8447309c7b167572bb3a140db897e55c3079c4ee8da5f544dfa5874452fbc72f973ad1b1e83bcb667831dd0a44e9473b6383980a40a9a4b0e1362366ef9aae67'

+             '3cc7b84e12df1f17845d3ff0e43aea820b0335f6743a22a7d71fb006698a99d274a641cc655a34f3d88d986365d8f7c842b113be9cbda52d7459436b71d38598')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/xdm.confd "${pkgdir}"/etc/conf.d/xdm

+   install -Dm755 "${srcdir}"/xdm.initd "${pkgdir}"/etc/init.d/xdm

+   install -Dm755 "${srcdir}"/xdm-setup.initd "${pkgdir}"/etc/init.d/xdm-setup

+ 

+   install -Dm755 "${srcdir}"/startDM.sh "${pkgdir}"/etc/X11/startDM.sh

+ }

@@ -0,0 +1,3 @@ 

+ post_install() {

+ 	echo "	==> Edit /etc/conf.d/xdm to set DM."

+ }

@@ -0,0 +1,25 @@ 

+ #!/bin/sh

+ # Copyright 1999-2011 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License, v2

+ 

+ # We need to source /etc/profile for stuff like $LANG to work

+ # bug #10190.

+ . /etc/profile

+ 

+ . /etc/init.d/functions.sh

+ 

+ # Great new Gnome2 feature, AA

+ # We enable this by default

+ export GDK_USE_XFT=1

+ 

+ export SVCNAME=xdm

+ EXEC="$(get_options service)"

+ NAME="$(get_options name)"

+ PIDFILE="$(get_options pidfile)"

+ START_STOP_ARGS="$(get_options start_stop_args)"

+ 

+ start-stop-daemon --start --exec ${EXEC} \

+ ${NAME:+--name} ${NAME} ${PIDFILE:+--pidfile} ${PIDFILE} ${START_STOP_ARGS} || \

+ eerror "ERROR: could not start the Display Manager"

+ 

+ # vim:ts=4

@@ -0,0 +1,13 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2009 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ depend() {

+ 	need localmount

+ }

+ 

+ start() {

+ 	if get_bootparam "nox" ; then

+ 		touch /etc/.noxdm

+ 	fi

+ }

@@ -0,0 +1,10 @@ 

+ # We always try and start X on a static VT. The various DMs normally default

+ # to using VT7. If you wish to use the xdm init script, then you should ensure

+ # that the VT checked is the same VT your DM wants to use. We do this check to

+ # ensure that you haven't accidentally configured something to run on the VT

+ # in your /etc/inittab file so that you don't get a dead keyboard.

+ CHECKVT=7

+ 

+ # What display manager do you use ?  [ xdm | gdm | sddm | gpe | entrance | lightdm | lxdm ]

+ # NOTE: If this is set in /etc/rc.conf, that setting will override this one.

+ DISPLAYMANAGER="xdm"

@@ -0,0 +1,132 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2014 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License, v2

+ 

+ depend() {

+     need localmount xdm-setup

+ 

+     # this should start as early as possible

+     after bootmisc consolefont modules netmount

+     after readahead-list ypbind autofs openvpn gpm lircmd

+     after quota keymaps

+     before alsasound

+ 

+     # Start before X

+     use elogind dbus xfs

+ }

+ 

+ setup_dm() {

+     local MY_XDM

+ 

+     MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')

+ 

+     NAME=

+     case "${MY_XDM}" in

+         entrance*)

+             EXE=/usr/bin/entrance

+             PIDFILE=/run/entrance.pid

+             ;;

+         gdm|gnome)

+             EXE=/usr/bin/gdm

+             PIDFILE=/run/gdm/gdm.pid

+             START_STOP_ARGS="--background"

+             AUTOCLEAN_CGROUP="yes"

+             ;;

+         wdm)

+             EXE=/usr/bin/wdm

+             PIDFILE=

+             ;;

+         gpe)

+             EXE=/usr/bin/gpe-dm

+             PIDFILE=/run/gpe-dm.pid

+             ;;

+         lxdm)

+             EXE=/usr/bin/lxdm-binary

+             PIDFILE=/run/lxdm.pid

+             START_STOP_ARGS="--background"

+             ;;

+         lightdm)

+             EXE=/usr/bin/lightdm

+             PIDFILE=/run/lightdm.pid

+             START_STOP_ARGS="--background"

+             ;;

+         sddm)

+             EXE="/usr/bin/sddm"

+             START_STOP_ARGS="-m --background"

+             PIDFILE=/run/sddm.pid

+             ;;

+         *)

+             # first find out if there is such executable

+             EXE="$(command -v ${MY_XDM} 2>/dev/null)"

+             PIDFILE="/run/${MY_XDM}.pid"

+ 

+             # warn user that he is doing sick things if the exe was not found

+             if [ -z "${EXE}" ]; then

+                 echo "ERROR: Your XDM value is invalid."

+                 echo "  No ${MY_XDM} executable could be found on your system."

+             fi

+             ;;

+     esac

+ 

+     if ! [ -x "${EXE}" ]; then

+         EXE=/usr/bin/xdm

+         PIDFILE=/run/xdm.pid

+         if ! [ -x "/usr/bin/xdm" ]; then

+             echo "ERROR: Please set your DISPLAYMANAGER variable in /etc/conf.d/xdm,"

+             echo "	or install x11-apps/xdm package"

+             eend 255

+         fi

+     fi

+ }

+ 

+ start() {

+     local EXE NAME PIDFILE AUTOCLEAN_CGROUP

+     setup_dm

+ 

+     if [ -f /etc/.noxdm ]; then

+         einfo "Skipping ${EXE##*/}, /etc/.noxdm found or \"nox\" bootparam passed."

+         rm /etc/.noxdm

+         return 0

+     fi

+ 

+     ebegin "Setting up ${EXE##*/}"

+ 

+     # save the prefered DM

+     save_options "service" "${EXE}"

+     save_options "name"    "${NAME}"

+     save_options "pidfile" "${PIDFILE}"

+     save_options "start_stop_args" "${START_STOP_ARGS}"

+     save_options "autoclean_cgroup" "${AUTOCLEAN_CGROUP:-no}"

+ 

+     /etc/X11/startDM.sh

+     eend 0

+ }

+ 

+ stop() {

+     local retval

+ 

+     retval=0

+ 

+     local myexe myname mypidfile myservice

+     myexe=$(get_options "service")

+     myname=$(get_options "name")

+     mypidfile=$(get_options "pidfile")

+     myservice=${myexe##*/}

+     yesno "${rc_cgroup_cleanup:-no}" || rc_cgroup_cleanup=$(get_options "autoclean_cgroup")

+ 

+     [ -z "${myexe}" ] && return 0

+ 

+     ebegin "Stopping ${myservice}"

+ 

+     if start-stop-daemon --quiet --test --stop --exec "${myexe}"; then

+         start-stop-daemon --stop --exec "${myexe}" --retry TERM/5/TERM/5 \

+             ${mypidfile:+--pidfile} ${mypidfile} \

+             ${myname:+--name} ${myname}

+         retval=${?}

+     fi

+ 

+     eend ${retval} "Error stopping ${myservice}"

+     return ${retval}

+ }

+ 

+ # vim: set ts=4 :

@@ -0,0 +1,21 @@ 

+ # Maintainer: nous@artixlinux.org

+ 

+ pkgname=distcc-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC distcc init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'distcc')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/distcc')

+ source=("distcc."{initd,confd})

+ sha512sums=('ecaf61fe4186d5bec0771a732ca5bdf9881d40a97d561c387c8dbb4cdfc50bf85f183f0fd4e384003ac63912817c1fc0dfe816c577ba1f284ffffa3f2ed6b630'

+             '049b37a439772d605e6eab42de343c4ad49dc35b8a47ee0b745b6cb82f8fb215985380ee571394798184d42e373936501e8785c09451b3351b88eca5eeac60d8')

+ 

+ package() {

+   install -Dm755 "$srcdir/distcc.initd" "$pkgdir/etc/init.d/distcc"

+   install -Dm644 "$srcdir/distcc.confd" "$pkgdir/etc/conf.d/distcc"

+ }

@@ -0,0 +1,43 @@ 

+ # /etc/conf.d/distccd: config file for /etc/init.d/distccd

+ 

+ DISTCCD_OPTS=""

+ 

+ # this is the distccd executable

+ DISTCCD_EXEC="/usr/bin/distccd"

+ 

+ # set this option to run distccd with extra parameters

+ # Default port is 3632.  For most people the default is okay.

+ DISTCCD_OPTS="${DISTCCD_OPTS} --port 3632"

+ 

+ # Logging

+ # You can change some logging options here:

+ # --log-file FILE

+ # --log-level LEVEL  [critical,error,warning, notice, info, debug]

+ #

+ # Leaving --log-file blank will log to syslog

+ # example: --log-file /dev/null --log-level warning

+ # example: --log-level critical

+ 

+ DISTCCD_OPTS="${DISTCCD_OPTS} --log-level critical"

+ 

+ # SECURITY NOTICE:

+ # It is HIGHLY recommended that you use the --listen option

+ # for increased security. You can specify an IP to permit connections

+ # from or a CIDR mask

+ # --listen accepts only a single IP

+ # --allow is now mandatory as of distcc-2.18.

+ # example:  --allow 192.168.0.0/24

+ # example:  --allow 192.168.0.5 --allow 192.168.0.150

+ # example:  --listen 192.168.0.2

+ DISTCCD_OPTS="${DISTCCD_OPTS} --allow 192.168.0.0/24"

+ #DISTCCD_OPTS="${DISTCCD_OPTS} --listen 192.168.0.2"

+ 

+ # set this for niceness

+ # Default is 15

+ DISTCCD_OPTS="${DISTCCD_OPTS} -N 15"

+ 

+ # By default distccd stores temporary files in /tmp

+ # Make sure to give distcc user write permission to

+ # the given TMPDIR

+ #TMPDIR="/tmp"

+ 

@@ -0,0 +1,16 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2020 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ depend() {

+ 	need net

+ 	use avahi-daemon ypbind

+ }

+ 

+ command="${DISTCCD_EXEC:-usr/bin/distccd}"

+ command_args="--user distcc --daemon --no-detach ${DISTCCD_OPTS}"

+ command_background="true"

+ pidfile="/run/${RC_SVCNAME}.pid"

+ 

+ export TMPDIR="${TMPDIR:-/tmp}"

+ 

@@ -0,0 +1,23 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=dovecot-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC dovecot init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'dovecot')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/dovecot')

+ source=("dovecot".{confd,initd})

+ sha512sums=('bc8979b26920493fb5611a23a0e45f89fc55c560371b49430ac6c273e075d123412553b0706a866550d2b30f2551c6d7e0ea714c14bcaf5e96465ae4247aa115'

+             '72fa6587522332f564959e5651f145c79a2d4a8889693252ea59dbf81f5c5b2cf7b5dbad3b7e57b984f2e5fe313971a905d27df6de6c8e6fc9d4e741a34d2453')

+ 

+ package() {

+   install -Dm755 "$srcdir/dovecot.initd" "$pkgdir/etc/init.d/dovecot"

+   install -Dm644 "$srcdir/dovecot.confd" "$pkgdir/etc/conf.d/dovecot"

+ }

@@ -0,0 +1,2 @@ 

+ # Dovecot configuration file location

+ DOVECOT_CONF=/etc/dovecot/dovecot.conf

@@ -0,0 +1,39 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License, v2 or later

+ 

+ extra_commands="checkconfig"

+ 

+ supervisor=supervise-daemon

+ command=/usr/bin/dovecot

+ command_args="-F -c ${DOVECOT_CONF}"

+ 

+ depend() {

+ 	need localmount

+ 	before postfix

+ 	after bootmisc ldap mysql ntp-client ntpd postgresql saslauthd slapd 

+ 	use logger net

+ }

+ 

+ checkconfig() {

+ 	DOVECOT_INSTANCE=${SVCNAME##*.}

+ 	if [ -n "${DOVECOT_INSTANCE}" -a "${SVCNAME}" != "dovecot" ]; then

+ 		DOVECOT_CONF=/etc/dovecot/dovecot.${DOVECOT_INSTANCE}.conf

+ 	else

+ 		DOVECOT_CONF=/etc/dovecot/dovecot.conf

+ 	fi

+ 	if [ ! -e ${DOVECOT_CONF} ]; then

+ 		eerror "You will need an ${DOVECOT_CONF} first"

+ 		return 1

+ 	fi

+ 	if [ -x /usr/sbin/dovecot ]; then

+ 		DOVECOT_BASEDIR=$(/usr/bin/dovecot -c ${DOVECOT_CONF} config -h base_dir)

+ 		if [ $? -ne 0 ]; then

+ 			eerror "Error parsing ${DOVECOT_CONF}"

+ 			return 1

+ 		fi

+ 	else

+ 		eerror "dovecot not executable"

+ 		return 1

+ 	fi

+ }

file modified
+29 -31
@@ -6,6 +6,7 @@ 

  # This package comes from Artix

  # Parabola changes:

  # - elogind and libelogind: do not provide {lib,}elogind=$pkgver, it's ridiculous

+ # - elogind: do not provide systemd-tools, openrc will conflict it

  # - libelogind: make libsystemd.so a copy of libelogind.so instead of linking it,

  #   so in that way it will provide the correct version according to the

  #   architecture (libsystemd.so=0-64 or libsystemd.so=0-32)
@@ -14,20 +15,20 @@ 

  pkgbase=elogind

  pkgname=('elogind' 'libelogind')

  pkgver=246.10

- pkgrel=2

+ pkgrel=1

  pkgdesc="The systemd project's logind, extracted to a standalone package"

- arch=('x86_64')

- arch+=('i686' 'armv7h')

+ arch=('x86_64' 'i686' 'armv7h')

  url="https://github.com/elogind/elogind"

  license=('GPL' 'LGPL2.1')

- makedepends=('acl' 'intltool' 'libtool' 'gperf' 'gtk-doc' 'polkit' 'dbus'

-             'libseccomp' 'meson' 'kexec-tools' 'openrc' 'libcap')

+ conflicts=('systemd-libsystemd')

+ makedepends=('intltool' 'libtool' 'gperf' 'gtk-doc' 'polkit' 'dbus'

+             'libseccomp' 'meson' 'kexec-tools' 'openrc')

  options=('!libtool')

  source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/elogind/elogind/archive/v${pkgver}.tar.gz"

-         #'elogind.confd' 'elogind.initd'

-         'elogind.sv.initd')

+         'elogind.confd' 'elogind.initd')

  sha256sums=('c490dc158c8f5bca8d00ecfcc7ad5af24d1c7b9e59990a0b3b1323996221a922'

-             'b4097e85f81f37d8529eb57563813e94b7c7afb9931d892907d805093187761b')

+             '344db76bf8aadfba4363c63aacd93c945a647bd5e425d756cbfd9cb4453afc66'

+             '2fc375b3aa61cb63b16c55840acaa69d26b16a01d393ee129d77c804efdac278')

  

  build() {

      local meson_options=(
@@ -38,7 +39,6 @@ 

          -Ddefault-hierarchy=hybrid

          -Dcgroup-controller=openrc

          -Ddefault-kill-user-processes=false

-         -Dman=true

      )

  

      arch-meson "$pkgbase-${pkgver}" build "${meson_options[@]}"
@@ -52,46 +52,44 @@ 

  

  package_elogind() {

      pkgdesc="The systemd project's logind, extracted to a standalone package"

-     provides=("systemd=${pkgver}" 'logind')

-     depends=('acl' 'dbus' 'libseccomp' 'libelogind' 'kexec-tools' 'udev')

+     provides=("systemd=${pkgver}")

+     depends=('pam' 'dbus' 'libseccomp' 'libelogind' 'kexec-tools' 'udev')

      optdepends=('polkit: polkit support')

      backup=('etc/elogind/logind.conf')

  

      provides+=("${pkgname}-openrc")

-     conflicts=('systemd-udev' "${pkgname}-openrc")

+     conflicts+=('systemd-udev' "${pkgname}-openrc")

      replaces=("${pkgname}-openrc")

  

      DESTDIR="$pkgdir" meson install -C build

  

-     ln -sfv libelogind.pc "${pkgdir}"/usr/lib/pkgconfig/libsystemd.pc

+     ln -sfv libelogind.pc ${pkgdir}/usr/lib/pkgconfig/libsystemd.pc

  

-     install -dm755 "${srcdir}"/_libelogind

-     mv -v "${pkgdir}"/usr/lib/libelogind*.so* "${srcdir}"/_libelogind

+     install -dm755 ${srcdir}/_libelogind

+     mv -v ${pkgdir}/usr/lib/libelogind*.so* ${srcdir}/_libelogind

  

-     install -d "${pkgdir}"/{etc,usr/lib}/elogind/{logind,sleep}.conf.d

+     # Init scripts

+     install -Dm755 ${srcdir}/elogind.initd ${pkgdir}/etc/init.d/elogind

+     install -Dm755 ${srcdir}/elogind.confd ${pkgdir}/etc/conf.d/elogind

  

-     # Init script

-     #install -Dm755 "${srcdir}"/elogind.initd "${pkgdir}"/etc/init.d/elogind

-     #install -Dm755 "${srcdir}"/elogind.confd "${pkgdir}"/etc/conf.d/elogind

-     install -Dm755 "${srcdir}"/elogind.sv.initd "${pkgdir}"/etc/init.d/elogind

- 

-     install -d "${pkgdir}"/etc/runlevels/boot

-     ln -sf /etc/init.d/elogind "${pkgdir}"/etc/runlevels/boot/elogind

+     install -d "${pkgdir}/etc/runlevels/boot"

+     ln -sf "/etc/init.d/elogind" "${pkgdir}/etc/runlevels/boot/elogind"

  }

  

  package_libelogind(){

      pkgdesc="elogind client libraries"

-     provides=('libelogind.so' 'liblogind')

-     provides+=("libsystemd=${pkgver}" "systemd-libs=${pkgver}"

+     groups=('base-devel')

+     provides=('libelogind.so'

+              "libsystemd=${pkgver}" "systemd-libs=${pkgver}"

               'libsystemd.so')

-     conflicts=('libsystemd.so')

+     conflicts+=('libsystemd.so')

      depends=('libcap' 'libudev')

  

-     cd "${pkgbase}-${pkgver}"

+     cd ${pkgbase}-${pkgver}

  

-     install -dm755 "${pkgdir}"/usr/lib

-     mv "${srcdir}"/_libelogind/libelogind*.so* "${pkgdir}"/usr/lib

+     install -dm755 ${pkgdir}/usr/lib

+     mv ${srcdir}/_libelogind/libelogind*.so* ${pkgdir}/usr/lib

  

-     install -m755 "${pkgdir}"/usr/lib/libelogind.so "${pkgdir}"/usr/lib/libsystemd.so

-     ln -sfv libsystemd.so "${pkgdir}"/usr/lib/libsystemd.so.0

+     install -m755 ${pkgdir}/usr/lib/libelogind.so ${pkgdir}/usr/lib/libsystemd.so

+     ln -sfv libsystemd.so ${pkgdir}/usr/lib/libsystemd.so.0

  }

@@ -0,0 +1,24 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=espeakup-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC espeakup init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'espeakup')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/espeakup')

+ source=("espeakup.confd"

+         "espeakup.initd")

+ sha512sums=('aebd97c63dbeae5025bf54f39bb3e7d97822a2b1b369e40b013c5c7da2eba968adf48800f62ef14541ca22ed3f3dfcbdb63b2a3d7f45975ae8bddfea0a42d931'

+             'e85d4792b3fadf14229a5625b80236e243c156a96592338777501e5ceb7dbbfcdcc0484aa09eeca342a1808dd62cb8c0bb82af8e35c2573d38cea7eadde6ba96')

+ 

+ package() {

+   install -Dm755 "$srcdir/espeakup.initd" "$pkgdir/etc/init.d/espeakup"

+   install -Dm644 "$srcdir/espeakup.confd" "$pkgdir/etc/conf.d/espeakup"

+ }

@@ -0,0 +1,9 @@ 

+ # conf.d file for espeakup

+ #

+ # Please check man 8 espeakup for more information about the options

+ # espeakup accepts.

+ #

+ # Currently, the only meaningful option is:

+ #   --default-voice=voicename -- set the espeak voice espeakup will use.

+ #

+ ESPEAKUP_OPTS=""

@@ -0,0 +1,12 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2009 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ command=/usr/bin/espeakup

+ command_args="${espeakup_opts:-${ESPEAKUP_OPTS}}"

+ pidfile=/run/espeakup.pid

+ 

+ depend() {

+ 	after modules

+ 	use alsasound pulseaudio

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: Nathan Owens <ndowens@artixlinux.org>

+ 

+ pkgname=exim-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="${pkgname/-openrc/} OpenRC init"

+ arch=('any')

+ url="https://gitea.artixlinux.org/PackagesE/exim-openrc"

+ license=('GPL2')

+ depends=('openrc' 'exim')

+ conflicts=('systemd-sysvcompat')

+ backup=("etc/conf.d/${pkgname/-openrc/}")

+ source=("exim.confd"

+         "exim.initd")

+ sha512sums=('bb6f5ead067af19ace661cc92bcd428da97570aedd1f9dc5b61a34e7e3fb3e028be6c96d51df73353bdfcaf69a3ee053fb03d245f868d63ebf518aa96ec82d66'

+             '5c6a29e62994a651f8054caa23be6ce0be32cca43696b04967dabb779e7b042e2e87f49995e713b24e7fd6e2b47d0f5f5bb0711cec77259340fafd9da29a7dd6')

+ 

+ package() {

+   install -Dm644 "$srcdir"/exim.confd "$pkgdir"/etc/conf.d/exim

+   install -Dm755 "$srcdir"/exim.initd "$pkgdir"/etc/init.d/exim

+ }

@@ -0,0 +1,8 @@ 

+ # Command-line options for running exim

+ #command_args="-bd -q15m"

+ 

+ # Where to log startup configuration checking

+ # - /dev/null - silent (default)

+ # - /dev/tty - show output on curent terminal

+ # - /path/filename - append to specified logfile

+ #startuplog=/var/log/exim/startup.log

@@ -0,0 +1,20 @@ 

+ #!/usr/bin/openrc-run

+ 

+ description="EXIM internet mailer"

+ 

+ supervisor=supervise-daemon

+ command=/usr/bin/exim

+ command_args=${command_args:--bdf -q15m}

+ cfgfile=/etc/mail/exim.conf

+ required_files="$cfgfile"

+ 

+ depend() {

+ 	use antivirus net

+ 	provide mta

+ }

+ 

+ start_pre() {

+ 	ebegin

+ 	$command -bV >/dev/null 2>>${startuplog:-/dev/null}

+ 	eend $?

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=fcron-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC fcron init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'fcron')

+ conflicts=('systemd-sysvcompat')

+ source=("fcron".{initd,confd})

+ sha512sums=('13f8d75e2dcb4ae52d03a79af7faee36e328f157fc22e4090b9f2798c8577e7f20c6e682446a200692efa4c5788df0fb1d53bc20a7141578cecf057f062e38d0'

+             '58a66cd495fcb6a9b49f1d244357dfd61188a0c09d2c02a93c9250b8d77d9b89aff41d947e25fd4c1248f39b6a97f045e760b52cdf2f065145a8bfe74b7bf25e')

+ 

+ package() {

+   install -Dm755 "$srcdir/fcron.initd" "$pkgdir/etc/init.d/fcron"

+   install -Dm644 "$srcdir/fcron.confd" "$pkgdir/etc/conf.d/fcron"

+ }

@@ -0,0 +1,7 @@ 

+ # /etc/conf.d/fcron

+ 

+ # Options to fcron

+ # See fcron(8) for more details

+ # Notes:

+ # * Do not specify another CONFIGFILE

+ #FCRON_OPTS=""

@@ -0,0 +1,100 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2017 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ FCRON_INSTANCE="${SVCNAME##*.}"

+ FCRON_OPTS=${FCRON_OPTS:-""}

+ 

+ if [ -n "${FCRON_INSTANCE}" ] && [ "${SVCNAME}" != "fcron" ]; then

+ 	FCRON_CONFIGFILE="/etc/fcron/fcron.${FCRON_INSTANCE}.conf"

+ else

+ 	FCRON_CONFIGFILE="/etc/fcron/fcron.conf"

+ fi

+ 

+ getconfig() {

+ 	local key="$1"

+ 	local value_default="$2"

+ 	local value=

+ 

+ 	if service_started; then

+ 		value="$(service_get_value "${key}")"

+ 	fi

+ 

+ 	if [ -z "${value}" ] && [ -r "${FCRON_CONFIGFILE}" ]; then

+ 		value="$(sed -n -e 's:^'"${key}"'[ \t]*=[ \t]*::p' "${FCRON_CONFIGFILE}")"

+ 	fi

+ 

+ 	if [ -z "${value}" ]; then

+ 		# Value not explicitly set in the configfile or configfile does not exist

+ 		# or is not readable

+ 		echo "${value_default}"

+ 	else

+ 		echo "${value}"

+ 	fi

+ 

+ 	return 0

+ }

+ 

+ depend() {

+ 	config "${FCRON_CONFIGFILE}"

+ 

+ 	use clock logger

+ 	need hostname

+ 

+ 	# provide the cron service if we are the main instance

+ 	[ "${SVCNAME}" = "fcron" ] && provide cron

+ }

+ 

+ 

+ command="/usr/bin/fcron"

+ command_args="${FCRON_OPTS} -c \"${FCRON_CONFIGFILE}\""

+ start_stop_daemon_args=${FCRON_SSDARGS:-"--wait 1000"}

+ pidfile="$(getconfig pidfile /run/fcron.pid)"

+ fcrontabs="$(getconfig fcrontabs /var/spool/fcron)"

+ fifofile="$(getconfig fifofile /run/fcron.fifo)"

+ required_files="${FCRON_CONFIGFILE}"

+ 

+ extra_started_commands="reload"

+ 

+ reload() {

+ 	 start-stop-daemon --signal HUP --pidfile "${pidfile}"

+ }

+ 

+ start_pre() {

+ 	if [ "${SVCNAME}" != "fcron" ]; then

+ 		local _has_invalid_instance_cfg=0

+ 

+ 		if [ "${pidfile}" = "/run/fcron.pid" ]; then

+ 			eerror "You cannot use the same pidfile like the default instance!"

+ 			eerror "Please adjust your 'pidfile' setting in '${FCRON_CONFIGFILE}'."

+ 			_has_invalid_instance_cfg=1

+ 		fi

+ 

+ 		if [ "${fcrontabs}" = "/var/spool/fcron" ]; then

+ 			eerror "You cannot use the same fcrontabs location like the default instance!"

+ 			eerror "Please adjust your 'fcrontabs' setting in '${FCRON_CONFIGFILE}'."

+ 			_has_invalid_instance_cfg=1

+ 		fi

+ 

+ 		if [ "${fifofile}" = "/run/fcron.fifo" ]; then

+ 			eerror "You cannot use the same fifo file like the default instance!"

+ 			eerror "Please adjust your 'fifofile' setting in '${FCRON_CONFIGFILE}'."

+ 			_has_invalid_instance_cfg=1

+ 		fi

+ 

+ 		[ ${_has_invalid_instance_cfg} -ne 0 ] && return 1

+ 	fi

+ 

+ 	checkpath --file "${FCRON_CONFIGFILE}" --owner root:fcron --mode 0640

+ 

+ 	if [ ! -d "${fcrontabs}" ]; then

+ 		ebegin "Creating missing spooldir '${fcrontabs}'"

+ 		${command} --newspooldir "${fcrontabs}"

+ 		eend $?

+ 	fi

+ }

+ 

+ start_post() {

+ 	service_set_value fcrontabs "${fcrontabs}"

+ 	service_set_value fifofile "${fifofile}"

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: Nathan Owens <ndowens @ artixlinux.org>

+ # Submitter: alium@artixlinux.org

+ 

+ pkgname=firewalld-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC firewalld init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'firewalld')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/firewalld')

+ source=("firewalld.initd")

+ sha512sums=('52d1853fda91ade0245f93d06f3e2ea8d60005e7b7620d5f276f271d661c2fd8f99a34895c2cf74d4504a693b557a3f4fde5996bf14da0e630c7c3c82d989d5e')

+ 

+ package() {

+   install -Dm755 "$srcdir/firewalld.initd" "$pkgdir/etc/init.d/firewalld"

+ 

+   sed -e 's|/usr/sbin|/usr/bin|g' -i ${pkgdir}/etc/init.d/firewalld

+ }

@@ -0,0 +1,14 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2018 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ description="FirewallD"

+ 

+ supervisor=supervise-daemon

+ command=/usr/sbin/firewalld

+ command_args="--nofork"

+ 

+ depend() {

+ 	need dbus

+ 	provide firewall

+ }

@@ -0,0 +1,18 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=fuse-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC fuse init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'fuse2')

+ conflicts=('systemd-sysvcompat')

+ source=("fuse.initd")

+ sha512sums=('cb550ab5d01ca2e6ee4e783ff068874328e0176659a5f82641dd50a4fa251de07a2a07daef3642f300931546430e3ca284aea504278d60654b6164530fb8e725')

+ 

+ package(){

+   install -Dm755 "${srcdir}"/fuse.initd "${pkgdir}"/etc/init.d/fuse

+ }

@@ -0,0 +1,35 @@ 

+ #!/usr/bin/openrc-run

+ # 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 ${?}

+ 	

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=git-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC git-daemon init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('git' 'openrc')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/git-daemon')

+ source=("git-daemon.confd"

+         "git-daemon.initd")

+ sha512sums=('fbf1f425206a76e2a8f82342537ed939ff7e623d644c086ca2ced5f69b36734695f9f80ebda1728f75a94d6cd2fcb71bf845b64239368caab418e4d368c141ec'

+             '27416a5b062ec4bc41285f0c22c11c1a6494558044fcc422faf70a1d2035cdf29c9904b5cd6b21a7d5a14c0072d1f07c802ba73830d265b1d28dcdc1d3a3a106')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/git-daemon.initd "${pkgdir}"/etc/init.d/git-daemon

+   install -Dm644 "${srcdir}"/git-daemon.confd "${pkgdir}"/etc/conf.d/git-daemon

+ 

+   sed -e 's|/var/git|/srv/git|' -i "${pkgdir}/etc/conf.d/git-daemon"

+ }

@@ -0,0 +1,19 @@ 

+ # conf.d file for git-daemon

+ #

+ # Please check man 1 git-daemon for more information about the options

+ # git-daemon accepts. You MUST edit this to include your repositories you wish

+ # to serve.

+ #

+ # Some of the meaningful options are:

+ #   --syslog      --- Enables syslog logging

+ #   --verbose     --- Enables verbose logging

+ #   --export-all  --- Exports all repositories

+ #   --port=XXXX   --- Starts in port XXXX instead of 9418

+ #

+ GITDAEMON_OPTS="--syslog --base-path=/var/git"

+ 

+ # To run an anonymous git safely, the following user should be able to only

+ # read your Git repositories. It should not be able to write to anywhere on

+ # your system, esp. not the repositories.

+ GIT_USER="nobody"

+ GIT_GROUP="nobody"

@@ -0,0 +1,13 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ pidfile="/run/git-daemon.pid"

+ command="/usr/bin/git"

+ command_args="daemon ${GITDAEMON_OPTS}"

+ command_user="${GIT_USER:-nobody}:${GIT_GROUP:-nobody}"

+ start_stop_daemon_args="-e HOME= -e XDG_CONFIG_HOME= -b -m"

+ 

+ depend() {

+ 	use logger

+ }

@@ -0,0 +1,18 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=glibc-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC nscd init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'glibc')

+ conflicts=('systemd-sysvcompat')

+ source=("nscd.initd")

+ sha512sums=('be8cbf94f818121e522fb93a696674c9e0433d2f61764074c4d0a2dbaaa14dc4e7a21e288689cea8394183ae9410e34e92811ca3d48cd410ef427167c8e3f7a7')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/nscd.initd "${pkgdir}"/etc/init.d/nscd

+ }

@@ -0,0 +1,85 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2020 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ description="The 'Name Service Cache Daemon' is a daemon that provides a cache"

+ description="${description} for the most common name service requests"

+ 

+ extra_started_commands="flush_all flush_hosts flush_group flush_passwd flush_netgroup flush_services"

+ 

+ description_flush_all="Will invalidate hosts, group, passwd, netgroup and services cache"

+ description_flush_hosts="Will invalidate hosts cache"

+ description_flush_group="Will invalidate group cache"

+ description_flush_passwd="Will invalidate passwd cache"

+ description_flush_netgroup="Will invalidate netgroup cache"

+ description_flush_services="Will invalidate services cache"

+ 

+ pidfile="/run/nscd/nscd.pid"

+ command="/usr/bin/nscd"

+ 

+ depend() {

+ 	use dns ldap net slapd logger

+ }

+ 

+ checkconfig() {

+ 	if [ ! -d /run/nscd ] ; then

+ 		checkpath -d -m 755 /run/nscd

+ 	fi

+ 

+ 	if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /run/nscd)" != "755" ] ; then

+ 		ewarn "nscd run dir is not readable, you should reset the perms:"

+ 		ewarn "chmod 755 /run/nscd"

+ 		ewarn "chmod a+rw /run/nscd/socket"

+ 		ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd"

+ 	fi

+ 

+ 	if grep -qs '^[[:space:]]*persistent\>' /etc/nscd.conf ; then

+ 		checkpath -d -m 700 /var/db/nscd

+ 	fi

+ }

+ 

+ _flush() {

+ 	local table=$1

+ 

+ 	ebegin "Flushing ${table} table"

+ 	${command} --invalidate ${table}

+ 	eend $?

+ }

+ 

+ flush_all() {

+ 	local has_errors=0

+ 

+ 	ebegin "Flushing all caches"

+ 

+ 	local table=

+ 	for table in passwd group hosts netgroup services; do

+ 		${command} --invalidate ${table}

+ 		[ $? -ne 0 ] && has_errors=1

+ 	done

+ 

+ 	eend ${has_errors}

+ }

+ 

+ flush_hosts() {

+ 	_flush hosts

+ }

+ 

+ flush_group() {

+ 	_flush group

+ }

+ 

+ flush_passwd() {

+         _flush passwd

+ }

+ 

+ flush_netgroup() {

+ 	_flush netgroup

+ }

+ 

+ flush_services() {

+ 	_flush services

+ }

+ 

+ start_pre() {

+ 	checkconfig

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=gpm-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC gpm init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'gpm')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/gpm')

+ source=("gpm.confd"

+         "gpm.initd")

+ sha512sums=('14a4306a7454d1a12fda29973b51aadd6d1a5cf4833b1be5298cfe0c1ebc63a479cc79490007ae92c6ae24368e19215dfc4bd50ef5b0cfa0fef88cf69db67065'

+             '60f963b826952ce18e3043bd82b4e23be0c1bfb244ec9d8fdcc52b0d3c43c5d8c03770159d87597c5876fc425e1346c77a211f95e2119b8f284a27518a0d2eba')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/gpm.initd "${pkgdir}"/etc/init.d/gpm

+   install -Dm755 "${srcdir}"/gpm.confd "${pkgdir}"/etc/conf.d/gpm

+ 

+   sed -e 's|/var/run|/run|g' -i ${pkgdir}/etc/init.d/gpm

+ }

@@ -0,0 +1,23 @@ 

+ # /etc/init.d/gpm

+ 

+ # Please uncomment the type of mouse you have and the appropriate MOUSEDEV entry

+ 

+ MOUSE=ps2

+ #MOUSE=imps2

+ #MOUSEDEV=/dev/psaux

+ MOUSEDEV=/dev/input/mice

+ 

+ # Extra settings

+ 

+ #RESPONSIVENESS=

+ #REPEAT_TYPE=raw

+ 

+ # Please uncomment this line if you want gpm to understand charsets used

+ # in URLs and names with ~ or : in them, etc. This is a good idea to turn on!

+ 

+ #APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\""

+ 

+ # Various other options, see gpm(8) manpage for more.

+ 

+ #APPEND="-g 1 -A60"

+ #APPEND="-l \"a-zA-Z0-9_.:~/\300-\326\330-\366\370-\377\" -g 1 -A60"

@@ -0,0 +1,28 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2012 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ #NB: Config is in /etc/conf.d/gpm

+ 

+ command=/usr/bin/gpm

+ command_args="

+ 	-m ${MOUSEDEV}

+ 	-t ${MOUSE}

+ 	${RESPONSIVENESS:+ -r ${RESPONSIVENESS}}

+ 	${REPEAT_TYPE:+ -R${REPEAT_TYPE}}

+ 	${APPEND}

+ "

+ 

+ pidfile=/var/run/gpm.pid

+ 

+ depend() {

+ 	need localmount

+ 	use hotplug logger

+ }

+ 

+ start_pre() {

+ 	if [ -z "${MOUSEDEV}" ] || [ -z "${MOUSE}" ] ; then

+ 		eerror "You need to setup MOUSEDEV and MOUSE in /etc/conf.d/gpm first"

+ 		return 1

+ 	fi

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ # Maintainer: nous <nous@artixlinux.org>

+ 

+ pkgname=haveged-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC haveged init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'haveged')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/haveged')

+ source=("haveged."{confd,initd})

+ sha512sums=('b7bc782765a4521d34485d44391da79a3d1ee3bfda548ffcbf662093c8c7fdeb6baf2813ed7aa741b07e7b7e8eca1a94dceaa37ef202f801686d89855ffb7c30'

+             '521562e63090156ee0320d4a7fd47c7003ae5b78f5ec3bd5586c771324961d49f5877d9859476d2bd462dda519fe731f6e4839302a50639ab33d431c17bc8856')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/haveged.initd "${pkgdir}"/etc/init.d/haveged

+   install -Dm644 "${srcdir}"/haveged.confd "${pkgdir}"/etc/conf.d/haveged

+ }

@@ -0,0 +1,9 @@ 

+ # Copyright 1999-2011 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ WATERMARK=1024

+ 

+ # -r0 is added always

+ HAVEGED_OPTS="-w ${WATERMARK} -v 1"

+ 

+ # vim:ft=gentoo-conf-d:

@@ -0,0 +1,14 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2013 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ pidfile=/run/${SVCNAME}.pid

+ 

+ supervisor=supervise-daemon

+ command="/usr/bin/${SVCNAME}"

+ command_args="-r 0 ${HAVEGED_OPTS} --Foreground"

+ 

+ depend() {

+ 	need localmount

+ 	provide entropy

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=hdparm-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC hdparm init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'hdparm')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/hdparm')

+ source=("hdparm.confd"

+         "hdparm.initd")

+ sha512sums=('968c6b9d26a71bf724728c259d35a499a644496875eac255dcac3cb4a7e5cadb677a4f6e5e0f8bbd7e1826b6fb77cb39af15b11d1e59b3e9daf9ba442b9e6f02'

+             '0417168cf540d2385c5edc4e199c9c2318f97c397d4bbb8b0ac6d4dcadf153564a51a9a5da172442c75a670f79fdec84da5db777a1400cf3c8d8cf6a7066fcc8')

+ 

+ package() {

+   install -Dm644 "${srcdir}"/hdparm.confd "${pkgdir}"/etc/conf.d/hdparm

+   install -Dm755 "${srcdir}"/hdparm.initd "${pkgdir}"/etc/init.d/hdparm

+ 

+   sed -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|g' -i "${pkgdir}"/etc/init.d/hdparm

+ }

@@ -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=""

@@ -0,0 +1,60 @@ 

+ #!/sbin/openrc-run

+ # Copyright 1999-2012 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ 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

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=hostapd-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC hostapd init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'hostapd')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/hostapd')

+ source=("hostapd.confd"

+         "hostapd.initd")

+ sha512sums=('0882263bbd7c0b05bf51f51d66e11a23a0b8ca7da2a3b8a30166d2c5f044c0c134e6bccb1d02c9e81819ca8fb0c0fb55c7121a08fe7233ccaa73ff8ab9a238fe'

+             '094bd4c536dc57225972b99030cd6d78d558d565767522883133d88c16cccb389affddd06a2b415446b5e6ff7065c2413fdb5e3901b5b095a00aaa8b304aaaef')

+ 

+ package() {

+   install -Dm755 "$srcdir/hostapd.initd" "$pkgdir/etc/init.d/hostapd"

+   install -Dm644 "$srcdir/hostapd.confd" "$pkgdir/etc/conf.d/hostapd"

+ }

@@ -0,0 +1,5 @@ 

+ # Space separated list of configuration files

+ CONFIGS="/etc/hostapd/hostapd.conf"

+ 

+ # Extra options to pass to hostapd, see hostapd(8)

+ OPTIONS=""

@@ -0,0 +1,21 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2006 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ # $Header: /var/cvsroot/gentoo-x86/net-wireless/hostapd/files/hostapd-0.6.9-init.d,v 1.2 2009/05/17 10:18:18 gurligebis Exp $

+ 

+ command="/usr/bin/hostapd"

+ command_args="-B ${OPTIONS} ${CONFIGS}"

+ extra_started_commands="reload"

+ required_files="$CONFIGS"

+ 

+ depend() {

+ 	need net

+ 	after firewall

+ 	use logger

+ }

+ 

+ reload() {

+ 	ebegin "Reloading ${SVCNAME} configuration"

+ 	kill -HUP $(pidof /usr/bin/hostapd) > /dev/null 2>&1

+ 	eend $?

+ }

@@ -0,0 +1,20 @@ 

+ 

+ pkgname=inetutils-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC inetutils init scripts"

+ arch=('any')

+ license=('GPL2')

+ depends=('openrc' 'inetutils')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/ftpd')

+ source=("ftpd.confd"

+         "ftpd.initd")

+ sha512sums=('7e7c95b4e1e65b6495346b1bd622bf490001a984bc29c0bd6895b41671ce6214e8dfd37b26333c6a93d7f60934785a1f580d898e26e4818fda8c2c2d32c9d56d'

+             '39adcb7501a0718ed2e94374da1a7ce653a8a8ca7c09237b5823a7ae1c8cd86df40a774c1503ff0ac488f6779f9b323acd722f8e663f5354c828a4f7a1516e37')

+ 

+ package() {

+   install -Dm755 "$srcdir/ftpd.initd" "$pkgdir/etc/init.d/ftpd"

+   install -Dm644 "$srcdir/ftpd.confd" "$pkgdir/etc/conf.d/ftpd"

+ }

@@ -0,0 +1,8 @@ 

+ #

+ # Parameters to be passed to ftpd

+ #

+ FTPD_ARGS="-D"

+ 

+ # Neeed for openrc newnet

+ #current openrc4arch packages are compiled with oldnet

+ #rc_need=\"!net\" 

@@ -0,0 +1,26 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2011 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ FTPD_BINARY="/usr/bin/ftpd"

+ FTPD_PIDFILE="/run/ftpd.pid"

+ 

+ depend() {

+     use logger dns

+     need net

+ }

+ 

+ start() {

+     ebegin "Starting ${SVCNAME}"

+     start-stop-daemon --start --exec "${FTPD_BINARY}" \

+         --pidfile "${FTPD_PIDFILE}" \

+         -- ${FTPD_ARGS}

+     eend $?

+ }

+ 

+ stop() {

+     ebegin "Stopping ${SVCNAME}"

+     start-stop-daemon --stop --exec "${FTPD_BINARY}" \

+         --pidfile "${FTPD_PIDFILE}" --quiet

+     eend $?

+ }

@@ -0,0 +1,38 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=iptables-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC iptables init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'iptables')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/iptables'

+         'etc/conf.d/ip6tables')

+ source=("iptables.confd"

+         "ip6tables.confd"

+         "iptables.initd"

+         "ebtables.confd"

+         "ebtables.initd")

+ sha512sums=('bd67d53e997ea65755148ba071fe6e3856d6e604b9167c666900721bc3dc24f63d395bc33a1a34ae50f95e72760da630db1a8d35afc81ec5973e60ba5343dc70'

+             '553ddf83558edaccf891a366175e47aad950853be0de556581cfa08f614afa1f4139c94b8d8d2884ed69018513edeb966331d4d6a615829ada65fac2066840e5'

+             '8897ab985424c895e261e0fe521921f0da8e09e38394655b0f91c65c0e8f603731faf70489f7a6610c83d6c2fde75f92f309405d72277643165a847e62238df7'

+             '088308eba077fcec35299c8aaad0492024173504a361c2ba7e29dce106888a78c72818a791f3d3655aed3f6df26a3319c42e2b2c54760cdbad036d46b89b97f3'

+             '82fa6298595ffdf0c286940f7a77b8246e274c3dc3f8c7448c1b36114cb9c8725b0466ba9feb34bd521bc3f7d9ae049ceae557a059d23acf2a2a97a167647b73')

+ 

+ package() {

+   for f in iptables ebtables; do

+     sed -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|g' \

+         -e 's|/sbin|/usr/bin|g' \

+ 	-i "${srcdir}"/"$f".initd

+     install -Dm755 "${srcdir}"/"$f".initd "${pkgdir}"/etc/init.d/"$f"

+     install -Dm644 "${srcdir}"/"$f".confd "${pkgdir}"/etc/conf.d/"$f"

+   done

+ 

+   install -Dm644 "${srcdir}"/ip6tables.confd "${pkgdir}"/etc/conf.d/ip6tables

+ 

+   install -Dm755 "${srcdir}"/iptables.initd "${pkgdir}"/etc/init.d/ip6tables

+ }

@@ -0,0 +1,11 @@ 

+ # /etc/conf.d/ebtables

+ 

+ # Location in which ebtables initscript will save set rules on 

+ # service shutdown

+ EBTABLES_SAVE="/var/lib/ebtables/rules-save"

+ 

+ # Options to pass to ebtables-save and ebtables-restore 

+ SAVE_RESTORE_OPTIONS=""

+ 

+ # Save state on stopping ebtables

+ SAVE_ON_STOP="yes"

@@ -0,0 +1,101 @@ 

+ #!/sbin/openrc-run

+ # Copyright 1999-2020 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_commands="save panic"

+ extra_started_commands="reload"

+ 

+ ebtables_bin="/sbin/ebtables"

+ ebtables_save=${EBTABLES_SAVE}

+ 

+ depend() {

+ 	before net

+ 	use logger

+ }

+ 

+ ebtables_tables() {

+ 	for table in filter nat broute; do

+ 		if ${ebtables_bin} -t ${table} -L > /dev/null 2>&1; then

+ 			printf '%s' "${table} "

+ 		fi

+ 	done

+ }

+ 

+ set_table_policy() {

+ 	local chains table=$1 policy=$2

+ 	case ${table} in

+ 		nat)    chains="PREROUTING POSTROUTING OUTPUT";;

+ 		broute) chains="BROUTING";;

+ 		filter) chains="INPUT FORWARD OUTPUT";;

+ 		*)      chains="";;

+ 	esac

+ 	local chain

+ 	for chain in ${chains} ; do

+ 		${ebtables_bin} -t ${table} -P ${chain} ${policy}

+ 	done

+ }

+ 

+ checkconfig() {

+ 	if [ ! -f ${ebtables_save} ] ; then

+ 		eerror "Not starting ebtables.  First create some rules then run:"

+ 		eerror "/etc/init.d/ebtables save"

+ 		return 1

+ 	fi

+ 	return 0

+ }

+ 

+ start() {

+ 	checkconfig || return 1

+ 	ebegin "Loading ebtables state and starting bridge firewall"

+ 	${ebtables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${ebtables_save}"

+ 	eend $?

+ }

+ 

+ stop() {

+ 	if [ "${SAVE_ON_STOP}" = "yes" ] ; then

+ 		save || return 1

+ 	fi

+ 	ebegin "Stopping bridge firewall"

+ 	local a

+ 	for a in $(ebtables_tables); do

+ 		set_table_policy $a ACCEPT

+ 

+ 		${ebtables_bin} -t $a -F

+ 		${ebtables_bin} -t $a -X

+ 	done

+ 	eend $?

+ }

+ 

+ reload() {

+ 	ebegin "Flushing bridge firewall"

+ 	local a

+ 	for a in $(ebtables_tables); do

+ 		${ebtables_bin} -t $a -F

+ 		${ebtables_bin} -t $a -X

+ 	done

+ 	eend $?

+ 

+ 	start

+ }

+ 

+ save() {

+ 	ebegin "Saving ebtables state"

+ 	touch "${ebtables_save}"

+ 	chmod 0600 "${ebtables_save}"

+ 	${ebtables_bin}-save $(ebtables_tables) ${SAVE_RESTORE_OPTIONS} > "${ebtables_save}"

+ 	eend $?

+ }

+ 

+ panic() {

+ 	service_started ebtables && svc_stop

+ 

+ 	local a

+ 	ebegin "Dropping all packets forwarded on bridges"

+ 	for a in $(ebtables_tables); do

+ 		${ebtables_bin} -t $a -F

+ 		${ebtables_bin} -t $a -X

+ 

+ 		set_table_policy $a DROP

+ 	done

+ 	eend $?

+ }

@@ -0,0 +1,27 @@ 

+ # /etc/conf.d/ip6tables

+ 

+ # Set wait option for xtables lock in seconds

+ # DEFAULT: 60

+ #IPTABLES_LOCK_WAIT_TIME="60"

+ 

+ # Set wait interval option for xtables lock in microseconds

+ # DEFAULT: 1000

+ #IPTABLES_LOCK_WAIT_INTERVAL="1000"

+ 

+ # Location in which ip6tables initscript will save set rules on

+ # service shutdown

+ IP6TABLES_SAVE="/var/lib/ip6tables/rules-save"

+ 

+ # Options to pass to ip6tables-save and ip6tables-restore 

+ SAVE_RESTORE_OPTIONS="-c"

+ 

+ # Save state on stopping ip6tables

+ SAVE_ON_STOP="yes"

+ 

+ # If you need to log ip6tables messages as soon as ip6tables 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"

@@ -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"

@@ -0,0 +1,165 @@ 

+ #!/sbin/openrc-run

+ # Copyright 1999-2018 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_commands="check save panic"

+ extra_started_commands="reload"

+ 

+ iptables_lock_wait_time=${IPTABLES_LOCK_WAIT_TIME:-"60"}

+ iptables_lock_wait_interval=${IPTABLES_LOCK_WAIT_INTERVAL:-"1000"}

+ 

+ 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 has_errors=0 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} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -t ${table} -P ${chain} ${policy}

+ 		[ $? -ne 0 ] && has_errors=1

+ 	done

+ 

+ 	return ${has_errors}

+ }

+ 

+ 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 [ -z "${iptables_save}" -o ! -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_pre() {

+ 	checkconfig || return 1

+ }

+ 

+ start() {

+ 	ebegin "Loading ${iptables_name} state and starting firewall"

+ 	${iptables_bin}-restore --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} ${SAVE_RESTORE_OPTIONS} < "${iptables_save}"

+ 	eend $?

+ }

+ 

+ stop_pre() {

+ 	checkkernel || return 1

+ }

+ 

+ stop() {

+ 	if [ "${SAVE_ON_STOP}" = "yes" ] ; then

+ 		save || return 1

+ 	fi

+ 

+ 	ebegin "Stopping firewall"

+ 	local has_errors=0 a

+ 	for a in $(cat ${iptables_proc}) ; do

+ 		set_table_policy $a ACCEPT

+ 		[ $? -ne 0 ] && has_errors=1

+ 

+ 		${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -F -t $a

+ 		[ $? -ne 0 ] && has_errors=1

+ 

+ 		${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -X -t $a

+ 		[ $? -ne 0 ] && has_errors=1

+ 	done

+ 	eend ${has_errors}

+ }

+ 

+ reload() {

+ 	checkkernel || return 1

+ 	checkrules || return 1

+ 	ebegin "Flushing firewall"

+ 	local has_errors=0 a

+ 	for a in $(cat ${iptables_proc}) ; do

+ 		${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -F -t $a

+ 		[ $? -ne 0 ] && has_errors=1

+ 

+ 		${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -X -t $a

+ 		[ $? -ne 0 ] && has_errors=1

+ 	done

+ 	eend ${has_errors}

+ 

+ 	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() {

+ 	# use iptables autoload capability to load at least all required

+ 	# modules and filter table

+ 	${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -S >/dev/null

+ 	if [ $? -ne 0 ] ; then

+ 		eerror "${iptables_bin} failed to load"

+ 		return 1

+ 	fi

+ 

+ 	if service_started ${iptables_name}; then

+ 		rc-service ${iptables_name} stop

+ 	fi

+ 

+ 	local has_errors=0 a

+ 	ebegin "Dropping all packets"

+ 	for a in $(cat ${iptables_proc}) ; do

+ 		${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -F -t $a

+ 		[ $? -ne 0 ] && has_errors=1

+ 

+ 		${iptables_bin} --wait ${iptables_lock_wait_time} --wait-interval ${iptables_lock_wait_interval} -X -t $a

+ 		[ $? -ne 0 ] && has_errors=1

+ 

+ 		if [ "${a}" != "nat" ]; then

+ 			# The "nat" table is not intended for filtering, the use of DROP is therefore inhibited.

+ 			set_table_policy $a DROP

+ 			[ $? -ne 0 ] && has_errors=1

+ 		fi

+ 	done

+ 	eend ${has_errors}

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=krb5-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC krb5 init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'krb5')

+ conflicts=('systemd-sysvcompat')

+ source=("krb5kadmind.initd"

+         "krb5kdc.initd"

+         "krb5kpropd.initd")

+ sha512sums=('f6f353c6dcada82b27c519d280dac9cae5e2625e56e198df2dd657cb0773cd3759cd28edb0f80734706f1dd7fad83e143fb9fc00436ea0f9f1d3757880a0685e'

+             '5e9434a65989bfe99eb6c1db4c5828ed0375b856b10ee83c8aa6ad6dd60b6fbe44ee890815776c8fcf326bd7667e5484fc51d1be8ec52f7bf6620788292335a9'

+             'c3fc89408e2059044adc2045e0bf206bafe319742784d135c7d471ac4e92e1bddd53e5a7c0d9b5e8930d143ae74fd8cbc7fb85d4624857d17c09628b6e190f70')

+ 

+ package() {

+   for f in krb5kadmind krb5kdc krb5kpropd;do

+     install -Dm755 "${srcdir}/$f".initd "${pkgdir}"/etc/init.d/"$f"

+   done

+ }

@@ -0,0 +1,25 @@ 

+ #!/usr/bin/openrc-run

+ 

+ #---------------------------------------------------------------------------

+ # This script starts/stops the MIT Kerberos 5 Admin daemon

+ #---------------------------------------------------------------------------

+ 

+ daemon="MIT Kerberos 5 Admin daemon"

+ exec="/usr/bin/kadmind"

+ 

+ depend() {

+ 	need krb5kdc

+ 	use net

+ }

+ 

+ start() {

+ 	ebegin "Starting $daemon"

+ 	start-stop-daemon --start --quiet --exec ${exec} -- ${KADMIND_OPTS} 1>&2

+ 	eend $? "Error starting $daemon"

+ }

+ 

+ stop() {

+ 	ebegin "Stopping $daemon"

+ 	start-stop-daemon --stop --quiet --exec ${exec} 1>&2

+ 	eend $? "Error stopping $daemon"

+ }

@@ -0,0 +1,24 @@ 

+ #!/usr/bin/openrc-run

+ 

+ #---------------------------------------------------------------------------

+ # This script starts/stops the MIT Kerberos 5 KDC

+ #---------------------------------------------------------------------------

+ 

+ daemon="MIT Kerberos 5 KDC"

+ exec="/usr/bin/krb5kdc"

+ 

+ depend() {

+ 	use net

+ }

+ 

+ start() {

+ 	ebegin "Starting $daemon"

+ 	start-stop-daemon --start --quiet --exec ${exec} -- ${KDC_OPTS} 1>&2

+ 	eend $? "Error starting $daemon"

+ }

+ 

+ stop() {

+ 	ebegin "Stopping $daemon"

+ 	start-stop-daemon --stop --quiet --exec ${exec} 1>&2

+ 	eend $? "Error stopping $daemon"

+ }

@@ -0,0 +1,24 @@ 

+ #!/usr/bin/openrc-run

+ 

+ #---------------------------------------------------------------------------

+ # This script starts/stops the MIT Kerberos 5 kpropd

+ #---------------------------------------------------------------------------

+ 

+ daemon="MIT Kerberos 5 kpropd"

+ exec="/usr/bin/kpropd"

+ 

+ depend() {

+ 	use net krb5kdc krb5kadmind

+ }

+ 

+ start() {

+ 	ebegin "Starting $daemon"

+ 	start-stop-daemon --start --quiet --exec ${exec} -- ${KPROPD_OPTS} 1>&2

+ 	eend $? "Error starting $daemon"

+ }

+ 

+ stop() {

+ 	ebegin "Stopping $daemon"

+ 	start-stop-daemon --stop --quiet --exec ${exec} 1>&2

+ 	eend $? "Error stopping $daemon"

+ }

@@ -0,0 +1,21 @@ 

+ 

+ pkgname=laptop-mode-tools-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC laptop-mode init scripts"

+ arch=('any')

+ license=('GPL2')

+ depends=('openrc' 'laptop-mode-tools')

+ conflicts=('systemd-sysvcompat')

+ source=("laptop_mode.initd")

+ sha512sums=('4242cda1df6b55cd0bee66dfb9137b6f63118bc31c5f703ed44c42738f47dc794d7f1ed6dd9ba5696b606c4bf624428e8f21e1683cb698d8dda249833a4c5f68')

+ 

+ package() {

+   install -Dm755 "$srcdir/laptop_mode.initd" "$pkgdir/etc/init.d/laptop_mode"

+ 

+   sed -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|g' \

+       -e 's|/var/run|/run|g' \

+       -e 's|/usr/sbin|/usr/bin|g' \

+       -i ${pkgdir}/etc/init.d/laptop_mode

+ }

@@ -0,0 +1,52 @@ 

+ #!/sbin/openrc-run

+ # Copyright 1999-2012 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_started_commands="reload"

+ 

+ depend() {

+ 	need localmount

+ 	use acpid hald

+ 	after bootmisc

+ }

+ 

+ checkconfig() {

+ 	if [ ! -f /proc/sys/vm/laptop_mode ] ; then

+ 		eerror "Kernel does not support laptop_mode"

+ 		return 1

+ 	fi

+ }

+ 

+ start() {

+ 	checkconfig || return 1

+ 

+ 	ebegin "Starting laptop_mode"

+ 	# bug #342049 fix

+ 	# check if dir exists and creates if it doesn't

+ 	checkpath -q -d -m 755 /var/run/laptop-mode-tools

+ 	touch /var/run/laptop-mode-tools/enabled

+ 	/usr/sbin/laptop_mode auto >/dev/null

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping laptop_mode"

+ 	rm -f /var/run/laptop-mode-tools/enabled

+ 	/usr/sbin/laptop_mode stop >/dev/null

+ 	eend $?

+ }

+ 

+ reload() {

+ 	if ! service_started "${SVCNAME}" ; then

+ 		eerror "${SVCNAME} has not yet been started"

+ 		return 1

+ 	fi

+ 

+ 	ebegin "Reloading laptop_mode"

+ 	/usr/sbin/laptop_mode stop >/dev/null

+ 	rm -f /var/run/laptop-mode-tools/*

+ 	/usr/sbin/laptop_mode auto force >/dev/null

+ 	eend $?

+ }

+ 

+ # vim: set ts=4 :

@@ -0,0 +1,39 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ # Contributor: nous <nous@artixlinux.org>

+ 

+ pkgname=libvirt-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC libvirt init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'libvirt')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/libvirtd')

+ source=("libvirtd.confd"

+         "libvirtd.initd"

+         "virtlockd.initd"

+         "virtlogd.initd"

+         "libvirt-guests.confd"

+         "libvirt-guests.initd")

+ sha512sums=('98f935589dbc5f2a99329f77fdf84c563fa0dc99404b7476603679478d68ce8dbea2c88645251d3c28f59e7bcae124ae632972146e8a8c3e0e9fcbfb27296f91'

+             'a3e5cc6f14cd3c9af65b7478d57f275c8e061cd7681b2ec24daf606fe4af5b80488be5a063c5e8d857115c4c80c0bad733d49d2c7261f002fab4542af79f3f06'

+             '2f2b1421965b4b54524eca8676c522fd455d8abf09f6b184d73367be845513be3f8292714410961d14ef6a49045506b14622feafeb3e6717755374ab73883043'

+             'e5af86da3269a50c5d9c8a043706538a8dfc09fe55ac4366244ec62e667bb91b774b08a8a3a0699a6d97f4a0e453257134594a3440b0d75cc19d9dca375a7c63'

+             '78f419a89de7aabaad860903c24f1c070786fc1296d987e61dd537705b0e7f71a46c315888028f3826c3417e42861ca8471788be4ec5695e98427c5f18ae63fc'

+             '0ada907d26137a728489fc339ff0f096ff6e9b2aae9521b0d964eecdfab288706ad274b02a2e897a2ddf8f62be91499940511c3f694c4333bbc8073fb1e9fde9')

+ 

+ package() {

+   for _c in libvirtd libvirt-guests ; do

+     install -Dm644 "$srcdir/$_c.confd" "$pkgdir/etc/conf.d/$_c"

+   done

+ 

+   for _i in libvirtd virtlockd virtlogd libvirt-guests ; do

+     install -Dm755 "$srcdir/$_i.initd" "$pkgdir/etc/init.d/$_i"

+   done

+ }

+ 

@@ -0,0 +1,68 @@ 

+ # /etc/conf.d/libvirtd

+ 

+ # LIBVIRT_URIS

+ # space separated list of libvirt URIs to communicate with to start/stop guests

+ # Valid values are anything that can be passed to 'virsh connect'

+ 

+ #LIBVIRT_URIS="qemu:///system"

+ 

+ 

+ # LIBVIRT_SHUTDOWN

+ # Valid options:

+ # * managedsave - Performs a state save external to the VM (for hypervisors

+ #                 supporting this operation). qemu-kvm will stop the CPU

+ #                 and save off all state to a separate file. When the

+ #                 machine is started again, it will resume like nothing

+ #                 ever happened. This is guarenteed to always successfully

+ #                 stop your machine and restart it.

+ #

+ # * shutdown -    Sends an ACPI shutdown (think of this as a request to

+ #                 your guest to shutdown). There is no way to distinguish

+ #                 between guests that are ignoring the shutdown request or

+ #                 are stuck or are taking a long time to shutdown. We will

+ #                 wait LIBVIRT_MAXWAIT seconds before yanking the power

+ #                 out.

+ #

+ # * destroy  -    Immediately stop all running guests. Use with caution as

+ #                 this can leave the guest in a corrupted state and might

+ #                 lead to data loss.

+ #

+ 

+ #LIBVIRT_SHUTDOWN="managedsave"

+ 

+ 

+ # LIBVIRT_MAXWAIT

+ # Timeout in seconds until stopping a guest and "pulling the plug" on the

+ # guest

+ # Valid values are any integer over 0

+ 

+ #LIBVIRT_MAXWAIT="500"

+ 

+ 

+ # LIBVIRT_START

+ # If this value is set to 'no', then guests and networks that were shutdown

+ # by this script when it was stopped will not be started when it is started

+ # back up.

+ # Valid values are yes or no

+ 

+ #LIBVIRT_START="yes"

+ 

+ 

+ # LIBVIRT_IGNORE_AUTOSTART

+ # If the VM is marked for autostart in its XML configuration then we won't

+ # save its start when the init script is stopped. The result is that when

+ # the init script starts back up, no attempt will be made to start the VM or

+ # confirm it is started.

+ # Valid values are yes or no

+ 

+ #LIBVIRT_IGNORE_AUTOSTART="no"

+ 

+ 

+ # LIBVIRT_NET_SHUTDOWN

+ # If libvirtd created networks for you (e.g. NATed networks) then this init

+ # script will shut them down for you if this is set to 'yes'. Otherwise,

+ # the networks will be left running. For this option to be useful you must

+ # have enabled the 'virt-network' USE flag and have had libvirt create a

+ # NATed network for you. Valid values: 'yes' or 'no'

+ 

+ #LIBVIRT_NET_SHUTDOWN="yes"

@@ -0,0 +1,237 @@ 

+ #!/usr/bin/openrc-run

+ 

+ description="Virtual Machine Management (libvirt) Guests"

+ 

+ depend() {

+ 	use libvirtd

+ }

+ 

+ # set the default to QEMU

+ [ -z "${LIBVIRT_URIS}" ] && LIBVIRT_URIS="qemu:///system"

+ 

+ # default to suspending the VM via managedsave

+ case "${LIBVIRT_SHUTDOWN}" in

+ 	managedsave|shutdown|destroy) ;;

+ 	*) LIBVIRT_SHUTDOWN="managedsave" ;;

+ esac

+ 

+ # default to 500 seconds

+ [ -z ${LIBVIRT_MAXWAIT} ] && LIBVIRT_MAXWAIT=500

+ 

+ gueststatefile="/var/lib/libvirt/libvirt-guests.state"

+ netstatefile="/var/lib/libvirt/libvirt-net.state"

+ 

+ do_virsh() {

+ 	local hvuri=$1

+ 	shift

+ 

+ 	# if unset, default to qemu

+ 	[ -z ${hvuri} ] && hvuri="qemu:///system"

+ 	# if only qemu was supplied then correct the value

+ 	[ "xqemu" = x${hvuri} ] && hvuri="qemu:///system"

+ 

+ 	# Silence errors because virsh always throws an error about

+ 	# not finding the hypervisor version when connecting to libvirtd

+ 	# lastly strip the blank line at the end

+ 	LC_ALL=C virsh -c ${hvuri} "$@" 2>/dev/null | head -n -1

+ }

+ 

+ libvirtd_dom_list() {

+ 	# Only work with domains by their UUIDs

+ 	local hvuri=$1

+ 	shift

+ 

+ 	# The grep is to remove dom0 for xen domains. Otherwise we never hit 0

+ 	do_virsh "${hvuri}" list --uuid $@ | grep -v 00000000-0000-0000-0000-000000000000

+ }

+ 

+ libvirtd_dom_count() {

+ 	local hvuri=$1

+ 	shift

+ 

+ 	libvirtd_dom_list "${hvuri}" $@ | wc -l

+ }

+ 

+ libvirtd_net_list() {

+ 	# Only work with networks by their UUIDs

+ 	local hvuri=$1

+ 	shift

+ 

+ 	do_virsh "${hvuri}" net-list --uuid $@

+ }

+ 

+ libvirtd_net_count() {

+ 	local hvuri=$1

+ 	shift

+ 

+ 	libvirtd_net_list "${hvuri}" $@ | wc -l

+ }

+ 

+ libvirtd_dom_stop() {

+ 	# stops all persistent or transient domains for a given URI

+ 	# $1 - uri

+ 	# $2 - persisent/transient

+ 

+ 	local uri=$1

+ 	local persist=$2

+ 	local shutdown_type=${LIBVIRT_SHUTDOWN}

+ 	local counter=${LIBVIRT_MAXWAIT}

+ 	local dom_name=

+ 	local dom_as=

+ 	local dom_ids=

+ 	local uuid=

+ 	local dom_count=

+ 

+ 	[ "${persist}" = "--transient" ] && shutdown_type="shutdown"

+ 	[ -n "${counter}" ] || counter=500

+ 

+ 	einfo " Shutting down domain(s) ..."

+ 

+ 	# grab all persistent or transient domains running

+ 	dom_ids=$(libvirtd_dom_list ${uri} ${persist})

+ 

+ 	for uuid in ${dom_ids}; do

+ 		# Get the name

+ 		dom_name=$(do_virsh ${uri} domname ${uuid})

+ 		einfo "  ${dom_name}"

+ 		# Get autostart state

+ 		dom_as=$(do_virsh ${uri} dominfo ${uuid} | \

+ 			awk '$1 == "Autostart:" { print $2 }')

+ 

+ 		if [ "${persist}" = "--persistent" ]; then

+ 			# Save our running state only if LIBVIRT_IGNORE_AUTOSTART != yes

+ 			if  [ "x${LIBVIRT_IGNORE_AUTOSTART}" = "xyes" ] && \

+ 				[ ${dom_as} = "enabled" ]; then

+ 				:

+ 			else

+ 				echo "${uri} ${uuid}" >> ${gueststatefile}

+ 			fi

+ 

+ 		fi

+ 

+ 		# Now let's stop it

+ 		do_virsh "${uri}" ${shutdown_type} ${uuid} > /dev/null

+ 

+ 	done

+ 

+ 	dom_count="$(libvirtd_dom_count ${uri} ${persist})"

+ 	while [ ${dom_count} -gt 0 ] && [ ${counter} -gt 0 ] ; do

+ 		dom_count="$(libvirtd_dom_count ${uri} ${persist})"

+ 		sleep 1

+ 		if [ "${shutdown_type}" = "shutdown" ]; then

+ 			counter=$((${counter} - 1))

+ 		fi

+ 		printf "."

+ 	done

+ 

+ 	if [ "${shutdown_type}" = "shutdown" ]; then

+ 		# grab all domains still running

+ 		dom_ids=$(libvirtd_dom_list ${uri} ${persist})

+ 		for uuid in ${dom_ids}; do

+ 			dom_name=$(do_virsh ${uri} domname ${uuid})

+ 			eerror "  ${dom_name} forcibly stopped"

+ 			do_virsh "${uri}" destroy ${uuid} > /dev/null

+ 		done

+ 	fi

+ }

+ 

+ libvirtd_net_stop() {

+ 	# stops all persistent or transient domains for a given URI

+ 	# $1 - uri

+ 	# $2 - persisent/transient

+ 

+ 	local uri=$1

+ 	local persist=$2

+ 	local uuid=

+ 	local net_name=

+ 

+ 	if [ "${LIBVIRT_NET_SHUTDOWN}" != "no" ]; then

+ 

+ 		einfo " Shutting down network(s):"

+ 		for uuid in $(libvirtd_net_list ${uri} ${persist}); do

+ 			net_name=$(do_virsh ${uri} net-name ${uuid})

+ 			einfo "   ${net_name}"

+ 

+ 			if [ "${persist}" = "--persistent" ]; then

+ 				# Save our running state

+ 				echo "${uri} ${uuid}" >> ${netstatefile}

+ 

+ 			fi

+ 

+ 			# Actually stop the network

+ 			do_virsh qemu net-destroy ${uuid} > /dev/null

+ 		done

+ 

+ 	fi

+ }

+ 

+ start() {

+ 	local uri=

+ 	local uuid=

+ 	local name=

+ 

+ 	for uri in ${LIBVIRT_URIS}; do

+ 		do_virsh "${uri}" connect

+ 		if [ $? -ne 0 ]; then

+ 			eerror "Failed to connect to '${uri}'. Domains may not start."

+ 		fi

+ 	done

+ 

+ 	[ ! -e "${netstatefile}" ] && touch "${netstatefile}"

+ 	[ ! -e "${gueststatefile}" ] && touch "${gueststatefile}"

+ 

+ 	# if the user didn't want to start any guests up then respect their wish

+ 	[ "x${LIBVIRT_START}" = "xno" ] && return 0

+ 

+ 	# start networks

+ 	ebegin "Starting libvirt networks"

+ 	while read -r uri uuid

+ 	do

+ 		# ignore trash

+ 		[ -z "${uri}" ] || [ -z "${uuid}" ] && continue

+ 

+ 		name=$(do_virsh "${uri}" net-name ${uuid})

+ 		einfo "  ${name}"

+ 		do_virsh "${uri}" net-start ${uuid} > /dev/null

+ 	done <"${netstatefile}"

+ 	eend 0

+ 

+ 	# start domains

+ 	ebegin "Starting libvirt domains"

+ 	while read -r uri uuid

+ 	do

+ 		# ignore trash

+ 		[ -z "${uri}" ] || [ -z "${uuid}" ] && continue

+ 

+ 		name=$(do_virsh "${uri}" domname ${uuid})

+ 		einfo "  ${name}"

+ 		do_virsh "${uri}" start ${uuid} > /dev/null

+         do_virsh "${uri}" domtime --sync ${uuid} > /dev/null

+ 	done <"${gueststatefile}"

+ 	eend 0

+ }

+ 

+ stop() {

+ 	local counter=

+ 	local dom_name=

+ 	local net_name=

+ 	local dom_ids=

+ 	local uuid=

+ 	local dom_count=

+ 

+ 	rm -f "${gueststatefile}"

+ 	[ $? -ne 0 ] && eerror "Unable to save domain state"

+ 	rm -f "${netstatefile}"

+ 	[ $? -ne 0 ] && eerror "Unable to save net state"

+ 

+ 	for uri in ${LIBVIRT_URIS}; do

+ 		einfo "Stopping libvirt domains and networks for ${uri}"

+ 

+ 		libvirtd_dom_stop "${uri}" "--persistent"

+ 		libvirtd_dom_stop "${uri}" "--transient"

+ 		libvirtd_net_stop "${uri}" "--persistent"

+ 		libvirtd_net_stop "${uri}" "--transient"

+ 

+ 		einfo "Done stopping domains and networks for ${uri}"

+ 	done

+ }

@@ -0,0 +1,18 @@ 

+ # /etc/conf.d/libvirtd

+ 

+ # Startup dependency

+ # libvirtd typically requires all networks to be up and settled which

+ # is what rc_need="net" provides. However if you only use specific networks

+ # for libvirtd, you may override this. Or if you only use libvirtd locally.

+ rc_need="net"

+ 

+ # The termination timeout (start-stop-daemon parameter "retry") ensures

+ # that the service will be terminated within a given time (25 + 5 seconds

+ # per default) when you are stopping the service.

+ #LIBVIRTD_TERMTIMEOUT="TERM/25/KILL/5"

+ 

+ # LIBVIRTD_OPTS

+ # You may want to add '--listen' to have libvirtd listen for tcp/ip connections

+ # if you want to use libvirt for remote control

+ # Please consult 'libvirtd --help' for more options

+ #LIBVIRTD_OPTS="--listen"

@@ -0,0 +1,32 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2020 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ description="Virtual Machine Management daemon (libvirt)"

+ 

+ LIBVIRTD_OPTS=${LIBVIRTD_OPTS:-"${LIBVIRTD_OPTS}"}

+ LIBVIRTD_TIMEOUT=${LIBVIRTD_TERMTIMEOUT:-"TERM/25/KILL/5"}

+ 

+ command="/usr/bin/libvirtd"

+ command_args="${LIBVIRTD_OPTS}"

+ start_stop_daemon_args="-b --env KRB5_KTNAME=/etc/libvirt/krb5.tab"

+ pidfile="/run/libvirtd.pid"

+ retry="${LIBVIRTD_TERMTIMEOUT}"

+ 

+ depend() {

+ 	need virtlogd

+ 	use ceph dbus iscsid virtlockd firewalld avahi-daemon

+ 	after cgconfig corosync ebtables iptables ip6tables nfs nfsmount ntp-client ntpdportmap rpc.statd sanlock xenconsoled

+ }

+ 

+ start_pre() {

+ 	# Test configuration directories in /etc/libvirt/ to be either not

+ 	# present or a directory, i.e. not a regular file, bug #532892

+ 

+ 	checkpath --directory /etc/libvirt/lxc || return 1

+ 	checkpath --directory /etc/libvirt/nwfilter || return 1

+ 	[ -L /etc/libvirt/qemu ] ||

+ 		checkpath --directory /etc/libvirt/qemu || return 1

+ 	[ -L /etc/libvirt/storage ] ||

+ 		checkpath --directory /etc/libvirt/storage || return 1

+ }

@@ -0,0 +1,23 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2020 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ description="libvirt virtual machine lock manager"

+ command="/usr/bin/virtlockd"

+ start_stop_daemon_args="-b"

+ pidfile="/run/virtlockd.pid"

+ 

+ extra_started_commands="reload"

+ description_reload="re-exec the daemon, while maintaining locks and clients"

+ 

+ 

+ depend() {

+     after ntp-client ntpd nfs nfsmount corosync

+ }

+ 

+ reload() {

+     ebegin "re-exec() virtlockd"

+ 

+     start-stop-daemon --signal SIGUSR1 \

+       --exec "${command}" --pidfile "${pidfile}"

+ }

@@ -0,0 +1,23 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2020 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ description="libvirt virtual machine logging manager"

+ command="/usr/bin/virtlogd"

+ start_stop_daemon_args="-b"

+ pidfile="/run/virtlogd.pid"

+ 

+ extra_started_commands="reload"

+ description_reload="re-exec the daemon, while maintaining open connections"

+ 

+ 

+ depend() {

+     after ntp-client ntpd nfs nfsmount corosync

+ }

+ 

+ reload() {

+     ebegin "re-exec() virtlogd"

+ 

+     start-stop-daemon --signal SIGUSR1 \

+       --exec "${command}" --pidfile "${pidfile}"

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=lighttpd-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC lighttpd init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/PackagesL/lighttpd-openrc"

+ license=('GPL2')

+ depends=('openrc' 'lighttpd')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/lighttpd')

+ source=('lighttpd.confd'

+         'lighttpd.initd')

+ sha512sums=('dd722c15230df734d7151bcb9cfc66d6d54aac5dcdca5f50eb33979d3a2443ba3a9ef3d7cb35e6dbd3d39fce09da15ab0029b1399bf1b1e4f4ef20d40f70a416'

+             '8154e0a6860c732abebb9de00d915ce1a3778bd127d054abb4db07184b729008f3dae75b9bfe7a59725fe97aee94b299d1d6307af3586afff4a320e11256f513')

+ 

+ package() {

+   install -Dm644 "${srcdir}"/lighttpd.confd "${pkgdir}"/etc/conf.d/lighttpd

+   install -Dm755 "${srcdir}"/lighttpd.initd "${pkgdir}"/etc/init.d/lighttpd

+ }

@@ -0,0 +1,8 @@ 

+ # /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"

@@ -0,0 +1,35 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2012 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ name="lighttpd"

+ description="Lighttpd web server"

+ conf_file="${LIGHTTPD_CONF:-/etc/lighttpd/lighttpd.conf}"

+ 

+ supervisor=supervise-daemon

+ command="/usr/bin/lighttpd"

+ command_args="-D -f ${conf_file}"

+ required_files="${conf_file}"

+ 

+ depend() {

+ 	need net

+ 	use mysql logger spawn-fcgi ldap slapd netmount dns

+ 	after firewall

+ 	after famd

+ 	after sshd

+ }

+ 

+ checkconfig() {

+ 	ebegin "Checking for ${conf_file}"

+ 	if [ ! -f "${conf_file}" ] ; then

+ 		eerror "${conf_file} does not exist."

+ 	fi

+ 	eend $?

+ 

+ 	/usr/bin/lighttpd -t -f "${conf_file}" >/dev/null

+ }

+ 

+ start_pre() {

+ 	checkconfig || return $?

+ 	checkpath -d -q -m 0750 /run/lighttpd/

+ }

@@ -0,0 +1,9 @@ 

+ /var/log/lighttpd/*log {

+     missingok

+     copytruncate

+     notifempty

+     sharedscripts

+     postrotate

+         rc-service lighttpd reload || true

+     endscript

+ }

@@ -0,0 +1,34 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=lirc-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC lirc init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'lirc')

+ conflicts=('systemd-sysvcompat' 'lirc-util')

+ provides=('lirc-utils-openrc')

+ conflicts=('lirc-utils-openrc')

+ replaces=('lirc-utils-openrc')

+ backup=('etc/conf.d/lircd'

+         'etc/conf.d/irexec'

+         'etc/conf.d/lircmd')

+ source=("lircd.confd" "lircd.initd"

+         "irexec.confd" "irexec.initd"

+         "lircmd.confd" "lircmd.initd")

+ sha512sums=('1fb1778f4cc72fc9c11b13a704b3abe80bcce5b3770b69b6b6bea8571e5293adad8c6968779b812e611b67734462c9a577cc71c6b16da3a5bfe31b8007300a62'

+             'bbd2598078e7abfe1f2491922c961e8e78addda655d576dc5aa10fa5c22bf1673962ea30e0bb0f3df89232287d3b707873e16b7269abb744e3a73b8f9b6ca9c5'

+             '2b33e1044086d11fd6e1f9a204ce925182a3a2b92ef4399610e01702f9c2c8fbc87cae52961123297171eef3d40468ac17437b4281b26a5f3b256c9cebc612ac'

+             '154ed7c8e8acf8bc4c2bc2beea362f3b7b030c011bb172ffcb3a221212cfc4ecc40debe60a67a44e2162000f56dbfb1a1da347471dd5060ecb7c8130bf66d5a7'

+             '6a69c7600024f00947dc35e3c6cebf7524fcf5f2a1e799fe70590fef2070c1049c4e6177711821f4e7b13972fd6f535591b48bb1006acd44fa650591b3265ace'

+             'f8497328b2aaf5affa507b1dc66c8af3b0ab4f85132e1dd04e047a4daaf98f89082047dafbc27e7da74e21482d2093ca6b6acc273bac8a7d08449dfa62571be5')

+ 

+ package() {

+   for _i in lircd irexec lircmd ; do

+     install -Dm755 "$srcdir/$_i.initd" "$pkgdir/etc/init.d/$_i"

+     install -Dm644 "$srcdir/$_i.confd" "$pkgdir/etc/conf.d/$_i"

+   done

+ }

@@ -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

@@ -0,0 +1,27 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 2003 Martin Hierling <mad@cc.fh-lippe.de>

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ : ${IREXEC_USER:=root}

+ 

+ depend() {

+ 	need lircd

+ }

+ 

+ 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 --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."

+ }

+ 

@@ -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"

+ 

@@ -0,0 +1,51 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ PIDFILE=/run/lirc/${SVCNAME}.pid

+ : ${LIRCD_SYMLINKFILE:=/dev/lircd}

+ : ${LIRCD_SOCKET:=/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 /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/bin/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/bin/lircd

+ 	eend $?

+ }

@@ -0,0 +1,4 @@ 

+ # Options to pass to the lircmd process

+ 

+ LIRCMD_OPTS=""

+ 

@@ -0,0 +1,10 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ command=/usr/bin/lircmd

+ command_args="${LIRCMD_OPTS}"

+ 

+ depend() {

+ 	need lircd

+ }

@@ -0,0 +1,32 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=lm_sensors-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC lm_sensors init script"

+ arch=('any')

+ url="https://github.com/artix-linux/packages"

+ license=('GPL2')

+ depends=('openrc' 'lm_sensors')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/sensord'

+         'etc/conf.d/fancontrol'

+         'etc/conf.d/lm_sensors')

+ source=("sensord.initd"

+         "fancontrol".{confd,initd}

+         "lm_sensors".{confd,initd})

+ sha512sums=('38328559fc6897f6467e0d61eebd9f0c60f548e4cf04c8c5eb8ec360a7dffc6d14b3b4098f3bcd65b7fe9468678bed55d5af17934bc9a6623cf540c414fc9be9'

+             '06ec0b44e753bfa6a5ca461345e5857ac4d824cb3d9dd4955bbe884ff91d0184050476fe6da0ea8b0882243a51466af2d82540474581bd471f13c5977a0ec41a'

+             '578e2f96e1098723c5f02d76f2c7be41416ecbfb4c724d3ce1a8046c49d385c59a4118c92de544c2e1fa761aa93bd7c2bfd3cc833111af65efc9863da526e2d3'

+             'a31220f4bf337de7b17158e00c64e662527abe11c5cc9f8401216f757dcde1c220527ad73f375c0de051030119daeba4cef6c5155f077447a9391e273cd65f50'

+             '847ffe6c9168c80ffce2010c8b7ad47e6fb1f1c9775de755ec6d21a646aab7784ec495efbe57aa76bf3d868a569ce2f4ce7a3e775330efc150766d77af7b498e')

+ 

+ package() {

+   install -Dm755 "$srcdir/sensord.initd" "$pkgdir/etc/init.d/sensord"

+ 

+   for _i in fancontrol lm_sensors ; do

+     install -Dm755 "$srcdir/$_i.initd" "$pkgdir/etc/init.d/$_i"

+     install -Dm644 "$srcdir/$_i.confd" "$pkgdir/etc/conf.d/$_i"

+   done

+ }

@@ -0,0 +1,16 @@ 

+ # /etc/conf.d/fancontrol

+ 

+ # Configuration file

+ #FANCONTROL_CONFIGFILE="/etc/fancontrol"

+ 

+ # 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 forces fancontrol into background and wait 1000ms after we

+ # have started the service to ensure that the daemon is really up and

+ # running.

+ #FANCONTROL_SSDARGS="--background --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.

+ #FANCONTROL_TERMTIMEOUT="TERM/60/KILL/5"

@@ -0,0 +1,21 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ FANCONTROL_CONFIGFILE=${FANCONTROL_CONFIGFILE:-"/etc/fancontrol"}

+ FANCONTROL_SSDARGS=${FANCONTROL_SSDARGS:-"--background --wait 1000"}

+ FANCONTROL_TERMTIMEOUT=${FANCONTROL_TERMTIMEOUT:-"TERM/60/KILL/5"}

+ 

+ 

+ command="/usr/bin/fancontrol"

+ command_args="${FANCONTROL_CONFIGFILE}"

+ start_stop_daemon_args="${FANCONTROL_SSDARGS}"

+ pidfile="/run/fancontrol.pid"

+ retry="${FANCONTROL_TERMTIMEOUT}"

+ 

+ required_files="${FANCONTROL_CONFIGFILE}"

+ 

+ depend() {

+ 	need localmount

+ 	use lm_sensors

+ }

@@ -0,0 +1,4 @@ 

+ # /etc/conf.d/lm_sensors

+ 

+ # NOTE:

+ # For module loading please use /etc/modules-load.d/lm_sensors.conf

@@ -0,0 +1,21 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ command="/usr/bin/sensors"

+ 

+ depend() {

+ 	need localmount

+ 	after modules-load

+ }

+ 

+ start() {

+ 	ebegin "Initializing sensors"

+ 	${command} --set >/dev/null 2>&1

+ 	eend $?

+ }

+ 

+ stop() {

+ 	# Nothing to stop

+ 	return 0;

+ }

@@ -0,0 +1,19 @@ 

+ # /etc/conf.d/sensord

+ 

+ # PID file

+ #SENSORD_PIDFILE="/run/sensord.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.

+ #SENSORD_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.

+ #SENSORD_TERMTIMEOUT="TERM/60/KILL/5"

+ 

+ # Extra options to pass to the sensord daemon,

+ # see sensord(8) for more information

+ #SENSORD_OPTS=""

@@ -0,0 +1,19 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ SENSORD_PIDFILE=${SENSORD_PIDFILE:-"/run/sensord.pid"}

+ SENSORD_SSDARGS=${SENSORD_SSDARGS:-"--wait 1000"}

+ SENSORD_TERMTIMEOUT=${SENSORD_TERMTIMEOUT:-"TERM/60/KILL/5"}

+ SENSORD_OPTS=${SENSORD_OPTS:-""}

+ 

+ command="/usr/bin/sensord"

+ command_args="${SENSORD_OPTS} --pid-file ${SENSORD_PIDFILE}"

+ start_stop_daemon_args="${SENSORD_SSDARGS}"

+ pidfile="${SENSORD_PIDFILE}"

+ retry="${SENSORD_TERMTIMEOUT}"

+ 

+ depend() {

+ 	need localmount

+ 	use logger lm_sensors

+ }

@@ -0,0 +1,32 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=lvm2-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC lvm2 init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('device-mapper-openrc' 'lvm2')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/lvm')

+ source=("lvm.confd"

+         "lvm.initd"

+         "lvm-monitoring.initd"

+         "lvmpolld.initd")

+ #         "lvmlockd.initd"

+ sha512sums=('05818e09fc6d8fe8287283b832fa73b4d3ef539837f956b9bfa394d206c1e379a3227148040934ac690d77524f3f7b16ba0d262a11de268914b1d11afe3a3c97'

+             'f283931af03b732727a8bb52eb5a8c3cf645e0a483d96be5b771aa3260ada905a6390316bc839b9d54de6c6798150a92cf4a3f61fe17d50a6251879a31daa984'

+             'a46fc66a4a87a394e95761d2573c24b36d90aa91ede777805f4759c3e814d4d0d4ff22ff07cd5d8644c95ee0032df7fde9b0bdcc0947c6207c9d81345ae65920'

+             '2eedefecc6eb8edc6a7cde81576f43cc009c754a83cbfdb6f7c3162b9412d7103fd07ecec953f010f8bc1715b741600184d849f1566d15075acd51adb48fb0db')

+ 

+ package() {

+   install -Dm644 "${srcdir}"/lvm.confd "${pkgdir}"/etc/conf.d/lvm

+ 

+   for f in lvm lvm-monitoring lvmpolld; do

+     install -Dm755 "${srcdir}"/"$f".initd "${pkgdir}"/etc/init.d/"$f"

+   done

+ }

+ 

+ 

@@ -0,0 +1,38 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ # This script is based on upstream file

+ # LVM2.2.02.67/scripts/lvm2_monitoring_init_red_hat.in

+ 

+ depend() {

+ 	# As of .67-r1, we call ALL lvm start/stop scripts with --sysinit, that

+ 	# means dmeventd is NOT notified, as it cannot be safely running

+ 	need lvm dmeventd

+ }

+ 

+ VGCHANGE=/usr/bin/vgchange

+ VGS=/usr/bin/vgs

+ 

+ start() {

+ 	ret=0

+ 	# TODO do we want to separate out already active groups only?

+ 	VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null`

+ 	ebegin "Starting LVM monitoring for VGs ${VGSLIST}:"

+ 	$VGCHANGE --monitor y --poll y  ${VGSLIST}

+ 	ret=$?

+ 	eend $ret

+ 	return $ret

+ 

+ }

+ 

+ stop() {

+ 	ret=0

+ 	# TODO do we want to separate out already active groups only?

+ 	VGSLIST=`$VGS --noheadings -o name --rows 2> /dev/null`

+ 	ebegin "Stopping LVM monitoring for VGs ${VGSLIST}:"

+ 	$VGCHANGE --monitor n ${VGSLIST}

+ 	ret=$?

+ 	eend $ret

+ 	return $ret

+ }

@@ -0,0 +1,9 @@ 

+ # If LVM is built with udev, you must ensure udev is running first!

+ # Otherwise it will hang

+ rc_need="udev"

+ 

+ # LVM should normally only be started after mdraid is available

+ # this is because LVM physical volumes are very often MD devices.

+ rc_after="mdraid"

+ 

+ # vim: ft=gentoo-conf-d

@@ -0,0 +1,173 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2020 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ _get_lvm_path() {

+ 	local lvm_path=

+ 	for lvm_path in /bin/lvm /usr/bin/lvm ; do

+ 		[ -x "${lvm_path}" ] && break

+ 	done

+ 	echo "${lvm_path}"

+ }

+ 

+ _use_lvmetad() {

+ 	local lvm_path="$(_get_lvm_path)"

+ 	[ ! -x "${lvm_path}" ] && return 1

+ 	${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmetad=1'

+ }

+ 

+ _use_lvmlockd() {

+ 	local lvm_path="$(_get_lvm_path)"

+ 	[ ! -x "${lvm_path}" ] && return 1

+ 	${lvm_path} dumpconfig global 2>/dev/null | grep -q 'use_lvmlockd=1'

+ }

+ 

+ depend() {

+ 	before checkfs fsck

+ 	after modules device-mapper

+ 	# We may want lvmetad based on the configuration. If we added lvmetad

+ 	# support while lvm2 is running then we aren't dependent on it. For the

+ 	# more common case, if its disabled in the config we aren't dependent

+ 	# on it.

+ 	config /etc/lvm/lvm.conf

+ 	local _want=

+ 

+ 	if service_started ; then

+ 		_want=$(service_get_value want)

+ 	else

+ 		if _use_lvmetad ; then

+ 			_want="${_want} lvmetad"

+ 		fi

+ 

+ 		if _use_lvmlockd ; then

+ 			_want="${_want} lvmlockd"

+ 		fi

+ 	fi

+ 

+ 	# Make sure you review /etc/conf.d/lvm as well!

+ 	# Depending on your system, it might also introduce udev & mdraid

+ 	need sysfs

+ 

+ 	if [ -n "${_want}" ] ; then

+ 		want ${_want}

+ 	fi

+ }

+ 

+ config='global { locking_dir = "/run/lock/lvm" }'

+ 

+ dm_in_proc() {

+ 	local retval=0

+ 	for x in devices misc ; do

+ 		grep -qs 'device-mapper' /proc/${x}

+ 		retval=$((${retval} + $?))

+ 	done

+ 	return ${retval}

+ }

+ 

+ start() {

+ 	# LVM support for /usr, /home, /opt ....

+ 	# This should be done *before* checking local

+ 	# volumes, or they never get checked.

+ 

+ 	# NOTE: Add needed modules for LVM or RAID, etc

+ 	#       to /etc/modules.autoload if needed

+ 

+ 	lvm_path="$(_get_lvm_path)"

+ 	if [ -z "${lvm_path}" ] ; then

+ 		eerror "Failed to find lvm binary in /bin or /sbin!"

+ 		return 1

+ 	fi

+ 

+ 	if [ -z "${CDBOOT}" ] ; then

+ 		if [ -e /proc/modules ] && ! dm_in_proc ; then

+ 			ebegin "Trying to load dm-mod module"

+ 			modprobe dm-mod 2>/dev/null

+ 			eend $?

+ 		fi

+ 

+ 		if [ -d /proc/lvm ] || dm_in_proc ; then

+ 			local has_errors=0 verbose_command

+ 

+ 			yesno "${rc_verbose}" && verbose_command=" -v"

+ 

+ 			ebegin "Starting the Logical Volume Manager"

+ 

+ 			if _use_lvmetad ; then

+ 				# Extra PV find pass because some devices might not have been available until very recently

+ 				${lvm_path} pvscan${verbose_command} --config "${config}" --cache

+ 				[ $? -ne 0 ] && has_errors=1

+ 			fi

+ 

+ 			# Now make the nodes

+ 			${lvm_path} vgscan${verbose_command} --config "${config}" --mknodes

+ 			[ $? -ne 0 ] && has_errors=1

+ 

+ 			# Enable all VGs

+ 			${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate y

+ 			[ $? -ne 0 ] && has_errors=1

+ 

+ 			if _use_lvmlockd ; then

+ 				# Start lockd VGs as required

+ 				${lvm_path} vgchange${verbose_command} --config "${config}" --lock-start --lock-opt auto

+ 				[ $? -ne 0 ] && has_errors=1

+ 			fi

+ 

+ 			eend ${has_errors} "Failed to start the Logical Volume Manager"

+ 		fi

+ 	fi

+ }

+ 

+ start_post() {

+ 	local _want=

+ 	if _use_lvmetad ; then

+ 		_want="${_want} lvmetad"

+ 	fi

+ 

+ 	if _use_lvmlockd ; then

+ 		_want="${_want} lvmlockd"

+ 	fi

+ 

+ 	service_set_value want "${_want}"

+ }

+ 

+ stop() {

+ 	lvm_path="$(_get_lvm_path)"

+ 	if [ -z "${lvm_path}" ] ; then

+ 		eerror "Failed to find lvm binary in /bin or /sbin!"

+ 		return 1

+ 	fi

+ 

+ 	# Stop LVM2

+ 	if [ -f /etc/lvmtab -o -d /etc/lvm ] \

+ 		&& [ -d /proc/lvm  -o "$(grep device-mapper /proc/misc 2>/dev/null)" ]

+ 	then

+ 		local VGS=$($lvm_path vgs --config "${config}" -o vg_name --noheadings --nosuffix --rows 2> /dev/null)

+ 		if [ -z "${VGS}" ] ; then

+ 			# nothing to do for us

+ 			return 0

+ 		fi

+ 

+ 		local has_errors=0 verbose_command eend_cmd="eend"

+ 

+ 		yesno "${rc_verbose}" && verbose_command=" -v"

+ 

+ 		local msg="Failed to stop Logical Volume Manager"

+ 		if [ "${RC_RUNLEVEL}" = shutdown ] ; then

+ 			# failures on shutdown are non-fatal

+ 			eend_cmd="ewend"

+ 			msg="${msg} (possibly some LVs still needed for /usr or root)"

+ 		fi

+ 

+ 		ebegin "Stopping the Logical Volume Manager"

+ 

+ 		${lvm_path} vgchange${verbose_command} --config "${config}" --sysinit --activate n

+ 		[ $? -ne 0 ] && has_errors=1

+ 

+ 		${eend_cmd} ${has_errors} "${msg}"

+ 	fi

+ 

+ 	# at this point make sure we always exit without indicating an error

+ 	return 0

+ }

+ 

+ # vim:ts=4

@@ -0,0 +1,17 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ pidfile="/run/lvmpolld.pid"

+ command="/usr/bin/lvmpolld"

+ command_args="${LVMPOLLD_OPTS:=-p ${pidfile}}"

+ start_stop_daemon_args="--pidfile ${pidfile}"

+ 

+ depend() {

+ 	:

+ }

+ 

+ start_pre()

+ {

+ 	checkpath --directory /run/lvm || return 1

+ }

@@ -0,0 +1,21 @@ 

+ # Maintainer: nous <nous@artixlinux.org>

+ 

+ pkgname=mariadb-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC mariadb init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('mariadb' 'openrc')

+ conflicts=('systemd-sysvcompat')

+ replaces=('mysql-openrc')

+ source=('mariadb.initd' 'mariadb-supervise.initd')

+ sha512sums=('6f1a50e1e4564a28b5222037d6119a3ac684530f9332cf9056eee23db5b4ee8f546a7a7f498ce66a16b90eeac161a9bcd86ca16e4b562e323526822bdb2a2b2e'

+             '720054df115ad8065d41b4cedc377bd3bbe1e673f41df6f94efcee8eea3ef4e7502a6aa5c143975859c6482452ea17e4b64bc5fcbedad07951025067b820462a')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/mariadb.initd "${pkgdir}"/etc/init.d/mariadb

+   install -Dm755 "${srcdir}"/mariadb-supervise.initd "${pkgdir}"/etc/init.d/mariadb-supervise

+ }

@@ -0,0 +1,38 @@ 

+ #!/usr/bin/openrc-run

+ extra_stopped_commands="setup"

+ supervisor=supervise-daemon

+ #healthcheck_timer=10

+ 

+ retry="60"

+ pidfile="/run/mysqld/$RC_SVCNAME.pid"

+ command="/usr/bin/mysqld"

+ command_args="--basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --pid-file=/run/mysqld/mariadb.pid"

+ 

+ depend() {

+ 	use net

+ 	need localmount

+ }

+ 

+ start_pre() {

+ 	required_dirs=$(getconf datadir "/var/lib/mysql")

+ 

+ 	if [ ! -d $required_dirs/mysql ]; then

+ 		eerror "Datadir '$required_dirs' is empty or invalid."

+ 		eerror "Run '/etc/init.d/mariadb setup' to create new database."

+ 	fi

+ }

+ 

+ start_post() {

+ 	ewaitfile 10 $(getconf socket "/run/mysqld/mysqld.sock")

+ }

+ 

+ setup() {

+ 	ebegin "Creating a new MySQL database"

+ 	mysql_install_db --user=mysql --datadir=/var/lib/mysql

+ 	eend $?

+ }

+ 

+ getconf() {

+ 	v=$(my_print_defaults --mysqld | grep ^--$1)

+ 	[ -z $v ] && echo $2 || echo ${v#*=}

+ }

@@ -0,0 +1,36 @@ 

+ #!/usr/bin/openrc-run

+ extra_stopped_commands="setup"

+ 

+ retry="60"

+ pidfile="/run/mysqld/$RC_SVCNAME.pid"

+ command="/usr/bin/mysqld_safe"

+ command_args="--syslog --nowatch --pid-file=$pidfile"

+ 

+ depend() {

+ 	use net

+ 	need localmount

+ }

+ 

+ start_pre() {

+ 	required_dirs=$(getconf datadir "/var/lib/mysql")

+ 

+ 	if [ ! -d $required_dirs/mysql ]; then

+ 		eerror "Datadir '$required_dirs' is empty or invalid."

+ 		eerror "Run '/etc/init.d/mariadb setup' to create new database."

+ 	fi

+ }

+ 

+ start_post() {

+ 	ewaitfile 10 $(getconf socket "/run/mysqld/mysqld.sock")

+ }

+ 

+ setup() {

+ 	ebegin "Creating a new MySQL database"

+ 	mysql_install_db --user=mysql --datadir=/var/lib/mysql

+ 	eend $?

+ }

+ 

+ getconf() {

+ 	v=$(my_print_defaults --mysqld | grep ^--$1)

+ 	[ -z $v ] && echo $2 || echo ${v#*=}

+ }

@@ -0,0 +1,30 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=mdadm-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC mdadm init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'mdadm')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/mdadm')

+ source=("mdadm.confd"

+         "mdadm.initd"

+         "mdraid.confd"

+         "mdraid.initd")

+ sha512sums=('7bf66898000b3d02bbf0704a8032b0f4fc045380501dc8d2bbbb31d33b122d9c35879b25714663079eeadd207c9da87c9d9af8464e76146bf5b68594e73fd92c'

+             '748b2841b0a986f8d9ebc0b91da4ea6c0aa883e3536abb09cc742a60cac5769b0101a7d9a79f001f84c18eb0b6ac62f32fe3623f121367f0eb993f5fa96dbc80'

+             '37fe70f5df0fb2b68be01ee774e3a943cfb280322f2db0c5d6892e701fb58be26a225b78448814294bf68f154cca697278fcf9572a47b6201920d95ad05189d6'

+             '9b30f6d1a93468c52871d8136048d62c0cf2e71307fd54b47357485f7ad25cd86b4507e7cb78f5cb84172804aa3904cfc9d356dfeeb2369e85a349da371a1129')

+ 

+ package() {

+   for f in mdadm mdraid;do

+     install -Dm644 "${srcdir}"/"$f".confd "${pkgdir}"/etc/conf.d/"$f"

+     install -Dm755 "${srcdir}"/"$f".initd "${pkgdir}"/etc/init.d/"$f"

+   done

+ }

+ 

+ 

@@ -0,0 +1,7 @@ 

+ # /etc/conf.d/mdadm: config file for /etc/init.d/mdadm

+ 

+ # Misc options to pass to mdadm in monitor mode.

+ # For more info, run `mdadm --monitor --help` or see

+ # the mdadm(8) manpage.

+ 

+ MDADM_OPTS="--syslog"

@@ -0,0 +1,25 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2006 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ depend() {

+ 	use logger dns net

+ }

+ 

+ start() {

+ 	ebegin "Starting mdadm monitor"

+ 	mdadm --monitor --scan \

+ 		--daemonise \

+ 		--pid-file /run/mdadm.pid \

+ 		${MDADM_OPTS}

+ 	eend $?

+ }

+ 

+ stop() {

+ 	local ret

+ 	ebegin "Stopping mdadm monitor"

+ 	start-stop-daemon --stop --pidfile /run/mdadm.pid

+ 	ret=$?

+ 	rm -f /run/mdadm.pid

+ 	eend ${ret}

+ }

@@ -0,0 +1,11 @@ 

+ # /etc/conf.d/mdraid: config file for /etc/init.d/mdraid

+ 

+ # For people who run raid on top of some other layer (like

+ # dmcrypt), use rc_need to specify that requirement.  See

+ # the runscript(8) man page for more information.

+ 

+ # Most configuration happens in /etc/mdadm.conf.

+ 

+ # Pass additional options when assembling raids.

+ # Note: This applies to all raids.

+ MDADM_ASSEMBLE_OPTS=""

@@ -0,0 +1,39 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2015 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ depend() {

+ 	before checkfs fsck

+ 	after modules

+ }

+ 

+ start() {

+ 	local output

+ 

+ 	ebegin "Starting up RAID devices"

+ 	output=$(mdadm -As ${MDADM_ASSEMBLE_OPTS} 2>&1)

+ 	eend $? "${output}"

+ 

+ 	local pat="/dev/md_d*"

+ 	set -- ${pat}

+ 	if [ "$*" != "${pat}" ] ; then

+ 		ebegin "Creating RAID device partitions"

+ 		blockdev "$@"

+ 		eend $?

+ 		# wait because vgscan runs next, and we want udev to fire

+ 		sleep 1

+ 	fi

+ 

+ 	return 0

+ }

+ 

+ stop() {

+ 	local output

+ 

+ 	# XXX: Maybe drop this check ?

+ 	[ ! -e /etc/mdadm/mdadm.conf ] && [ ! -e /etc/mdadm.conf ] && return 0

+ 

+ 	ebegin "Shutting down RAID devices (mdadm)"

+ 	output=$(mdadm -Ss 2>&1)

+ 	eend $? "${output}"

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=metalog-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC metalog init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'metalog')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/metalog')

+ source=("metalog.confd"

+         "metalog.initd")

+ sha512sums=('4fea6b7f48e55d5f69a9c9a69f54623bb9d515e2fd2eda6829f8b769eec85e3de448eb42feb6bf65645400480169b3d70d56dff090103cfc95a3810515c42b2e'

+             '28e4f630a13af17f3bd57d0f331911c53170a329ab6a1aa3de06e513e0a35a957066380ed699c35ba64b3df1a38cd62ecf01c1c5a4a46713ae4d98bb81c412ea')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/metalog.initd "${pkgdir}"/etc/init.d/metalog

+   install -Dm644 "${srcdir}"/metalog.confd "${pkgdir}"/etc/conf.d/metalog

+ }

@@ -0,0 +1,18 @@ 

+ # /etc/conf.d/metalog

+ 

+ # 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'

@@ -0,0 +1,27 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2018 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ supervisor=supervise-daemon

+ command="metalog"

+ 

+ extra_started_commands="buffer unbuffer"

+ 

+ depend() {

+ 	need localmount

+ 	use clock hostname

+ 	after bootmisc

+ 	provide logger

+ }

+ 

+ buffer() {

+ 	ebegin "Enabling log buffering"

+ 	supervisor-daemon "${command}" --signal USR2

+ 	eend ${?}

+ }

+ 

+ unbuffer() {

+ 	ebegin "Disabling log buffering"

+ 	supervisor-daemon "${command}" --signal USR1

+ 	eend ${?}

+ }

@@ -0,0 +1,26 @@ 

+ # Maintainer: Nathan Owens <ndowens@artixlinux.org>

+ 

+ pkgname=mpd-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="${pkgname/-openrc/} OpenRC init"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'mpd')

+ conflicts=('systemd-sysvcompat')

+ backup=("etc/conf.d/mpd")

+ source=("mpd".{confd,initd})

+ sha512sums=('43c665341604fc289542e5b1f94957af2143551204905aa6320554a60c1f0a0a8ae705b776cbdae758b45bb6c906aecab0cda2ced4354643d76e4798074a7973'

+             '455b6c6b93a4ca4580b45bc23413a96cf775ff0b4bb5ed6ac6b374618a02944365ff25e50ec0941bfd1ee0e3a36f98cbec0fd1a691fe4599ccdfda053818205f')

+ b2sums=('ae3c582e1bda3a626a753df0927763a34c470997c6acd47ad01bd3e82fe486a4db01164f477c847d1e1b3aa303e5588da6b2361973caa75c3ad8a116f4eacd6b'

+         '93e21982b4d6b9e533e2a27f6c819b0ae3486adc07577410345ad8b464aabfc0688e5bf5311e16fe854f238aed938fc08dad089a25baba1de6dfe2307704e5c2')

+ 

+ package() {

+     install -Dm755 "${srcdir}"/mpd.initd "${pkgdir}"/etc/init.d/mpd

+     install -Dm644 "${srcdir}"/mpd.confd "${pkgdir}"/etc/conf.d/mpd

+ 

+     sed -e 's|/var/run|/run|g' \

+         -i ${pkgdir}/etc/init.d/mpd

+ }

@@ -0,0 +1,7 @@ 

+ # conf.d file for music player daemon

+ 

+ #

+ # Specify daemon $OPTS here.

+ #

+ 

+ MPD_OPTS=""

@@ -0,0 +1,22 @@ 

+ #!/usr/bin/openrc-run

+ 

+ supervisor=supervise-daemon

+ 

+ name="Music Player Daemon"

+ description="A daemon for playing music"

+ 

+ command=/usr/bin/mpd

+ command_args="$MPD_OPTS"

+ command_args_foreground="--no-daemon"

+ command_user="mpd:audio"

+ 

+ depend() {

+ 	need localmount

+ 	use net netmount nfsmount esound pulseaudio

+ 	after firewall

+ } 

+ 

+ start_pre() {

+ 	checkpath --directory --quiet \

+ 		--owner "$command_user" --mode 0775 /var/run/mpd

+ }

@@ -7,29 +7,27 @@ 

  # Contributor (Arch): Valentine Sinitsyn <e_val@inbox.ru>

  

  pkgbase=networkmanager

- pkgname=(networkmanager libnm nm-cloud-setup)

- pkgver=1.32.2

- pkgrel=1

+ pkgname=(networkmanager libnm)

+ pkgver=1.30.4

+ pkgrel=3

  pkgrel+=.nonsystemd1

  pkgdesc="Network connection manager and user applications"

  url="https://wiki.gnome.org/Projects/NetworkManager"

- arch=(x86_64)

- arch+=(i686 armv7h)

- license=(GPL2)

+ arch=(x86_64 i686 armv7h)

+ license=(GPL2 LGPL2.1)

  _pppver=2.4.9

- makedepends=(intltool dhclient dhcpcd iptables-nft gobject-introspection gtk-doc

-              "ppp=$_pppver" modemmanager iproute2 nss polkit wpa_supplicant curl

-              logind libmm-glib libnewt libndp libteam nftables vala perl-yaml

-              python-gobject git vala jansson bluez-libs glib2-docs iwd dnsmasq

-              openresolv libpsl audit meson)

+ makedepends=(intltool dhclient iptables gobject-introspection gtk-doc "ppp=$_pppver" modemmanager

+              iproute2 nss polkit wpa_supplicant curl elogind libmm-glib

+              libnewt libndp libteam vala perl-yaml python-gobject git vala jansson bluez-libs

+              glib2-docs dhcpcd iwd dnsmasq openresolv libpsl audit meson)

  checkdepends=(libx11 python-dbus)

- _commit=bf1b09702ed442a3efe426c8ceba4ef1e6bb1902  # tags/1.20.6^0

+ _commit=a3e45da9f984d58e3b76d6ca064033541d819eca  # tags/1.30.4^0

  source=("git+https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git#commit=$_commit"

          NetworkManager.{confd,initd} 10-openrc-status)

  sha256sums=('SKIP'

              '4594573f01fe5e04b6dde4525796acf909158591bdcefd662ec23fe0d1c3e1bd'

-             'eaf7d210540ed9f4c6b4ba81ddbb30a2aa5ce8b528057f7d64ce3478981f88e4'

-             'd32a21c0683cf7a09370b35b7e3d3b3f28f5d4d242ecde2c866cfb400b94bcbe')

+             '861445d46e8863dca26a91018da3dd9fee6a64467a93e7512774dfd88914539d'

+             '1535237db113a76261d6f1ce0b24a55e956934b0c1c59e9fd624f621961327b6')

  

  pkgver() {

    cd NetworkManager
@@ -38,53 +36,44 @@ 

  

  prepare() {

    cd NetworkManager

+ 

+   # https://bugs.archlinux.org/task/70710

+   git cherry-pick -n 8acad5a20cc61081438294efc634c0e245452e35

  }

  

  build() {

    local meson_args=(

-     # system paths

      -D dbus_conf_dir=/usr/share/dbus-1/system.d

- 

-     # platform

      -D dist_version="$pkgver-$pkgrel"

      -D session_tracking_consolekit=false

      -D suspend_resume=elogind

      -D modify_system=true

      -D polkit_agent=true

      -D selinux=false

-     -D systemdsystemunitdir=no

-     -D session_tracking=elogind

-     -D systemd_journal=false

- 

-     # features

      -D iwd=true

      -D pppd_plugin_dir=/usr/lib/pppd/$_pppver

      -D teamdctl=true

-     -D nm_cloud_setup=true

      -D bluez5_dun=true

      -D ebpf=true

- 

-     # configuration plugins

      -D config_plugins_default=keyfile

- 

-     # handlers for resolv.conf

-     -D netconfig=no

-     -D config_dns_rc_manager_default=symlink

- 

-     # miscellaneous

      -D vapi=true

      -D docs=true

      -D more_asserts=no

      -D more_logging=false

      -D qt=false

+     -D systemdsystemunitdir=no

+     -D session_tracking=elogind

+     -D systemd_journal=false

    )

  

    arch-meson NetworkManager build "${meson_args[@]}"

-   meson compile -C build

+   ninja -C build

  }

  

  check() {

-   meson test -C build --print-errorlogs

+   # iproute2 bug

+   # https://gitlab.freedesktop.org/NetworkManager/NetworkManager/commit/be76d8b624fab99cbd76092ff511e6adc305279c

+   meson test -C build --print-errorlogs || :

  }

  

  _pick() {
@@ -99,77 +88,58 @@ 

  

  package_networkmanager() {

    depends=(libnm iproute2 polkit wpa_supplicant libmm-glib libnewt libndp libteam curl

-            bluez-libs libpsl audit mobile-broadband-provider-info elogind)

+            bluez-libs libpsl audit elogind)

    optdepends=('dnsmasq: connection sharing'

-               'nftables: connection sharing'

-               'iptables: connection sharing'

                'bluez: Bluetooth support'

                'ppp: dialup connection support'

                'modemmanager: cellular network support'

-               'iwd: wpa_supplicant alternative'

-               'dhclient: alternative DHCP client'

-               'dhcpcd: alternative DHCP client'

-               'openresolv: alternative resolv.conf manager'

-               'firewalld: firewall support')

+               'iwd: wpa_supplicant alternative')

    provides=($pkgname-{elogind,openrc})

    replaces=($pkgname-{elogind,openrc})

    backup=(etc/NetworkManager/NetworkManager.conf)

+   groups=(gnome)

  

-   meson install -C build --destdir "$pkgdir"

- 

-   cd "$pkgdir"

+   DESTDIR="$pkgdir" meson install -C build

  

    # /etc/NetworkManager

-   install -d etc/NetworkManager/{conf,dnsmasq}.d

-   install -dm700 etc/NetworkManager/system-connections

-   install -m644 /dev/stdin etc/NetworkManager/NetworkManager.conf <<END

+   install -d "$pkgdir"/etc/NetworkManager/{conf,dnsmasq}.d

+   install -dm700 "$pkgdir/etc/NetworkManager/system-connections"

+   install -m644 /dev/stdin "$pkgdir/etc/NetworkManager/NetworkManager.conf" <<END

  # Configuration file for NetworkManager.

  # See "man 5 NetworkManager.conf" for details.

  END

  

    # packaged configuration

-   install -Dm644 /dev/stdin usr/lib/NetworkManager/conf.d/20-connectivity.conf <<END

+   install -Dm644 /dev/stdin "$pkgdir/usr/lib/NetworkManager/conf.d/20-connectivity.conf" <<END

  [connectivity]

- uri=http://ping.archlinux.org/nm-check.txt

+ uri=http://www.archlinux.org/check_network_status.txt

  END

  

-   shopt -s globstar

- 

-   _pick libnm usr/include/libnm

-   _pick libnm usr/lib/girepository-1.0/NM-*

-   _pick libnm usr/lib/libnm.*

-   _pick libnm usr/lib/pkgconfig/libnm.pc

-   _pick libnm usr/share/gir-1.0/NM-*

-   _pick libnm usr/share/gtk-doc/html/libnm

-   _pick libnm usr/share/vala/vapi/libnm.*

- 

-   _pick nm-cloud-setup "$pkgdir"/usr/lib/**/*nm-cloud-setup*

- #  _pick nm-cloud-setup "$pkgdir"/usr/share/man/*/nm-cloud-setup* (Parabola)

- 

-   # Restore empty dir

- # mkdir "$pkgdir/usr/lib/NetworkManager/dispatcher.d/no-wait.d" (Parabola)

+ ### Split libnm

+   _pick libnm "$pkgdir"/usr/include/libnm

+   _pick libnm "$pkgdir"/usr/lib/girepository-1.0/NM-*

+   _pick libnm "$pkgdir"/usr/lib/libnm.*

+   _pick libnm "$pkgdir"/usr/lib/pkgconfig/libnm.pc

+   _pick libnm "$pkgdir"/usr/share/gir-1.0/NM-*

+   _pick libnm "$pkgdir"/usr/share/gtk-doc/html/libnm

+   _pick libnm "$pkgdir"/usr/share/vala/vapi/libnm.*

  

    # Init script

    install -Dm755 ${srcdir}/NetworkManager.confd ${pkgdir}/etc/conf.d/NetworkManager

    install -Dm755 ${srcdir}/NetworkManager.initd ${pkgdir}/etc/init.d/NetworkManager

    install -Dm755 "${srcdir}/10-openrc-status" "${pkgdir}/etc/NetworkManager/dispatcher.d/10-openrc-status"

  

+   sed -e 's|#!/sbin/openrc-run|#!/usr/bin/openrc-run|g' \

+       -e 's|/var/run|/run|g' \

+       -e 's|/usr/sbin|/usr/bin|g' \

+       -e 's|use consolekit|use consolekit elogind|' \

+       -i ${pkgdir}/etc/init.d/NetworkManager

  }

  

  package_libnm() {

    pkgdesc="NetworkManager client library"

-   depends=(glib2 nss util-linux-libs jansson libelogind)

-   license=(LGPL)

-   provides=(libnm.so)

- 

+   depends=(glib2 nss libutil-linux jansson libelogind)

    mv libnm/* "$pkgdir"

  }

  

- package_nm-cloud-setup() {

-   pkgdesc="Automatically configure NetworkManager in cloud"

-   depends=(networkmanager)

- 

-   mv nm-cloud-setup/* "$pkgdir"

- }

- 

  # vim:set sw=2 et:

@@ -0,0 +1,43 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=nfs-utils-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC nfs-utils init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('nfs-utils' 'rpcbind-openrc' 'device-mapper-openrc')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/nfs'

+         'etc/conf.d/nfsclient')

+ source=("nfs.confd"

+         "nfs.initd"

+         "nfsclient.confd"

+         "nfsclient.initd"

+         "rpc.idmapd.initd"

+         "rpc.pipefs.initd"

+         "rpc.gssd.initd"

+         "rpc.svcgssd.initd"

+         "rpc.statd.initd")

+ sha512sums=('bc11b073735ee86c96b9c249ee187f4d16329c279a4e26760875059d2b5fa1d510ef3e4df5ee9dfb2a3133d755e1eb5c323d2fadc432a0cf630191ec353ac535'

+             '1f16076d3a749c415ad2f2e2f6c042b7aa3d73bcf0b27459c6d19268e5e18783762a13e89cd979df8e2445f31b9886cc2e97be27d1d3952a8f68966015819d0f'

+             'c79baac9ad76e09012cbebe22b1bd2dec3ed574c6e51e38cd4c534a92947719c887af927d325562fa539826680b5c52334fb7d1c2cd9d2a7295f1878080ca680'

+             '0f55e722d2722d489972abd1cccb955b25bedaf8389eb041cebb68ab00b5bb6755eee85c3e1f0683c6319582c99fa4f056890488962283293134bb43221a34df'

+             'a3bb4ece6492f9c80a81cd1d2f6e713afa331a39ce54849b853e92e6d0ed284f87aaed60722411254044f889a7a6732dc53644cb3c2c6f028d3d57da4fc26853'

+             'c5d8e20d9fec681d04cbe50c3c517b2cd92def8ca9d76eea65cc4ab7e68f0aa54598bd1f97e1827820f1f33bec1407aded94a13da735c9327eb4d3cbacc5a266'

+             'fb6f90e7dd3a7bd3ae42ef0907536849a95bf3f157bd9ee6d5ea90a7e0261fc12feff2a6bcee55ec2b849bb306d24ac8ea14b546d7e541fe925956051de4c50e'

+             'ddb502d631dc4d4e67c1967f3407cb5ebb5062381a3e0ff39c5292f51469dc23bfe1df3614e360db60f10ef7ef180fff3e814a4fa4b76e9f39d3c54569569a91'

+             '684cb8bf88693671f121e819aa80458ea9912ad6af8a06d7cf126ead41ef34b2a37335b320b414e9a3442dcbd3d797dd52284b08af6b4493acd1eb7cc95e5632')

+ 

+ package() {

+   for f in nfs nfsclient;do

+     install -Dm644 "${srcdir}"/"$f".confd "${pkgdir}"/etc/conf.d/"$f"

+     install -Dm755 "${srcdir}"/$f.initd "${pkgdir}"/etc/init.d/"$f"

+   done

+ 

+   for f in rpc.gssd rpc.idmapd rpc.pipefs rpc.statd rpc.svcgssd;do

+     install -Dm755 "${srcdir}"/"$f".initd "${pkgdir}"/etc/init.d/"$f"

+   done

+ }

@@ -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 <option>=<value>.  Multiple options are allowed.

+ #OPTS_NFSD="nfsv4leasetime=30 max_block_size=4096"

@@ -0,0 +1,128 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2014 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_started_commands="reload"

+ 

+ exportfs=/usr/bin/exportfs

+   mountd=/usr/bin/rpc.mountd

+     nfsd=/usr/bin/rpc.nfsd

+ smnotify=/usr/bin/sm-notify

+ 

+ depend() {

+ 	local myneed=""

+ 	myneed="${myneed} $(

+ 		awk '!/^[[:space:]]*#/ {

+ 			# clear the path to avoid spurious matches

+ 			$1 = "";

+ 			if ($0 ~ /[(][^)]*sec=(krb|spkm)[^)]*[)]/) {

+ 				print "rpc.svcgssd"

+ 				exit 0

+ 			}

+ 		}' /etc/exports /etc/exports.d/*.exports 2>/dev/null

+ 	)"

+ 	config /etc/exports /etc/exports.d/*.exports

+ 	need portmap rpc.statd ${myneed} ${NFS_NEEDED_SERVICES}

+ 	use ypbind net dns rpc.rquotad rpc.idmapd rpc.svcgssd

+ 	after quota

+ }

+ 

+ mkdir_nfsdirs() {

+ 	local d

+ 	for d in v4recovery v4root ; do

+ 		d="/var/lib/nfs/${d}"

+ 		[ ! -d "${d}" ] && mkdir -p "${d}"

+ 	done

+ }

+ 

+ waitfor_exportfs() {

+ 	local pid=$1

+ 	( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 ${pid} 2>/dev/null ) &

+ 	wait $1

+ }

+ 

+ mount_nfsd() {

+ 	if [ -e /proc/modules ] ; then

+ 		if ! grep -qs nfsd /proc/filesystems ; then

+ 			modprobe -q nfsd

+ 		fi

+ 		if grep -qs nfsd /proc/modules ; then

+ 			killall -q -HUP rpc.idmapd

+ 		fi

+ 	fi

+ 

+ 	if grep -qs nfsd /proc/filesystems ; then

+ 		if ! mountinfo -q /proc/fs/nfsd ; then

+ 			ebegin "Mounting nfsd filesystem in /proc"

+ 			mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfsd

+ 			eend $?

+ 		fi

+ 

+ 		local o

+ 		for o in ${OPTS_NFSD} ; do

+ 			echo "${o#*=}" > "/proc/fs/nfsd/${o%%=*}"

+ 		done

+ 	fi

+ }

+ 

+ start_it() {

+ 	ebegin "Starting NFS $1"

+ 	shift

+ 	"$@"

+ 	eend $?

+ 	ret=$((ret + $?))

+ }

+ start() {

+ 	mount_nfsd

+ 	mkdir_nfsdirs

+ 

+ 	if grep -qs '^[[:space:]]*"\?/' /etc/exports /etc/exports.d/*.exports ; then

+ 		ebegin "Exporting NFS directories"

+ 		${exportfs} -r &

+ 		waitfor_exportfs $!

+ 		eend $?

+ 	fi

+ 

+ 	local ret=0

+ 	start_it mountd ${mountd} ${OPTS_RPC_MOUNTD}

+ 	start_it daemon ${nfsd} ${OPTS_RPC_NFSD}

+ 	[ -x "${smnotify}" ] && start_it smnotify ${smnotify} ${OPTS_SMNOTIFY}

+ 	return ${ret}

+ }

+ 

+ stop() {

+ 	local ret=0

+ 

+ 	ebegin "Stopping NFS mountd"

+ 	start-stop-daemon --stop --exec ${mountd}

+ 	eend $?

+ 	ret=$((ret + $?))

+ 

+ 	ebegin "Stopping NFS daemon"

+ 	start-stop-daemon --stop --name nfsd --user root --signal 2

+ 	eend $?

+ 	ret=$((ret + $?))

+ 	rpc.nfsd 0

+ 

+ 	if [ "${RC_CMD}" != "restart" ] ; then

+ 		ebegin "Unexporting NFS directories"

+ 

+ 		${exportfs} -ua &

+ 		waitfor_exportfs $!

+ 		eend $?

+ 	fi

+ 

+ 	return ${ret}

+ }

+ 

+ reload() {

+ 	ebegin "Reloading /etc/exports"

+ 	${exportfs} -r 1>&2 &

+ 	waitfor_exportfs $!

+ 	eend $?

+ }

+ 

+ restart() {

+ 	svc_stop

+ 	svc_start

+ }

@@ -0,0 +1,18 @@ 

+ # You need to decide which nfs protocol version you want to use.

+ # If you are unsure, leave these alone.

+ #

+ # If you are using only nfsv4, uncomment this line:

+ #

+ #rc_need="!rpc.statd"

+ #

+ # If you are using only nfsv3, uncomment this line:

+ #

+ #rc_need="!rpc.idmapd"

+ #

+ # You will need to set the dependencies in the nfsclient script to match

+ # the network configuration tools you are using. This should be done in

+ # this file by following the examples below, and not by changing the

+ # service script itself.  See /etc/conf.d/netmount for more examples.

+ #

+ # This is a safe default.

+ rc_after="net"

@@ -0,0 +1,33 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2015 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

+ 

+ depend() {

+ 	local opts myneed=""

+ 	if [ -e /etc/fstab ] ; then

+ 		for opts in $(fstabinfo -o -t nfs,nfs4) ; do

+ 			case $opts in

+ 				*sec=krb*|*sec=spkm*) myneed="$myneed rpc.gssd" ;;

+ 			esac

+ 		done

+ 	fi

+ 	config /etc/fstab

+ 	need portmap rpc.statd rpc.idmapd ${myneed}

+ 	use ypbind dns

+ }

+ 

+ start() {

+ 	if [ -x /usr/bin/sm-notify ] ; then

+ 		ebegin "Starting NFS sm-notify"

+ 		/usr/bin/sm-notify ${OPTS_SMNOTIFY}

+ 		eend $?

+ 	fi

+ 

+ 	# Make sure nfs support is loaded in the kernel #64709

+ 	if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then

+ 		modprobe -q nfs

+ 	fi

+ 	return 0

+ }

@@ -0,0 +1,23 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2008 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

+ 

+ depend() {

+ 	use ypbind net

+ 	need portmap rpc.pipefs

+ 	after quota

+ }

+ 

+ start() {

+ 	ebegin "Starting gssd"

+ 	start-stop-daemon --start --exec /usr/bin/rpc.gssd -- ${OPTS_RPC_GSSD}

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping gssd"

+ 	start-stop-daemon --stop --exec /usr/bin/rpc.gssd

+ 	eend $?

+ }

@@ -0,0 +1,25 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2008 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

+ 

+ rpc_bin=/usr/bin/rpc.idmapd

+ 

+ depend() {

+ 	use ypbind net

+ 	need portmap rpc.pipefs

+ 	after quota

+ }

+ 

+ start() {

+ 	ebegin "Starting idmapd"

+ 	${rpc_bin} ${OPTS_RPC_IDMAPD}

+ 	eend $? "make sure DNOTIFY support is enabled ..."

+ }

+ 

+ stop() {

+ 	ebegin "Stopping idmapd"

+ 	start-stop-daemon --stop --exec ${rpc_bin}

+ 	eend $?

+ }

@@ -0,0 +1,32 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2014 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ MNT="/var/lib/nfs/rpc_pipefs"

+ 

+ mount_pipefs() {

+ 	local fstype=rpc_pipefs

+ 

+ 	# if things are already mounted, nothing to do

+ 	mountinfo -q ${MNT} && return 0

+ 

+ 	# if rpc_pipefs is not available, try to load sunrpc for it #219566

+ 	grep -qs ${fstype} /proc/filesystems || modprobe -q sunrpc

+ 	# if still not available, the `mount` will issue an error for the user

+ 

+ 	# now just do it for kicks

+ 	mkdir -p ${MNT}

+ 	mount -t ${fstype} ${fstype} ${MNT}

+ }

+ 

+ start() {

+ 	ebegin "Setting up RPC pipefs"

+ 	mount_pipefs

+ 	eend $? "make sure you have NFS/SUNRPC enabled in your kernel"

+ }

+ 

+ stop() {

+ 	ebegin "Unmounting RPC pipefs"

+ 	umount ${MNT}

+ 	eend $?

+ }

@@ -0,0 +1,32 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2015 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

+ 

+ rpc_bin=/usr/bin/rpc.statd

+ rpc_pid=/run/rpc.statd.pid

+ 

+ depend() {

+ 	use ypbind net

+ 	need portmap

+ 	after quota

+ }

+ 

+ start() {

+ 	# Don't start rpc.statd if already started by someone else ...

+ 	# Don't try and kill it if it's already dead ...

+ 	if killall -q -0 ${rpc_bin} ; then

+ 		return 0

+ 	fi

+ 

+ 	ebegin "Starting NFS statd"

+ 	start-stop-daemon --start --exec ${rpc_bin} -- --no-notify ${OPTS_RPC_STATD}

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping NFS statd"

+ 	start-stop-daemon --stop --exec ${rpc_bin} --pidfile /run/rpc.statd.pid

+ 	eend $?

+ }

@@ -0,0 +1,23 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2008 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

+ 

+ depend() {

+ 	use ypbind net

+ 	need portmap rpc.pipefs

+ 	after quota

+ }

+ 

+ start() {

+ 	ebegin "Starting svcgssd"

+ 	start-stop-daemon --start --exec /usr/bin/rpc.svcgssd -- ${OPTS_RPC_SVCGSSD}

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping svcgssd"

+ 	start-stop-daemon --stop --exec /usr/bin/rpc.svcgssd

+ 	eend $?

+ }

@@ -0,0 +1,35 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=nftables-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC nftables init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'nftables')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/nftables'

+         'etc/conf.d/nftables-mk')

+ source=("nftables"{,-mk}.{initd,confd}

+         "nftables"{,-mk}.sh)

+ sha512sums=('d75a1c1505aab8a00df76bd6b91efd107a87c7fcba9e0c0f27b013f667c49ccee1f55ae612f4fb7209c1d15f159c3f63486893e63797d784047f5e3ae802041e'

+             '8370abcdc89fcd9da5dc7d1620be6afb4633b8bcd0a8a120b464cc1a7e1fab6f34956c293da3f6d3cbe1f7a2e03038fd0c94a614137ae5657d29ffdb5f3fa144'

+             '686af6311c86da1af5852afd9fbf616d253d659e5f4c237a980723a86a793fed37a17197b9c8c2d01bbbc3c9528e28b1c3d4e6c5b40b61b9054b2c73522f5654'

+             '505ed05674a04367f1a3d5cf6447596ad1c3b2e9c920697f12f58a20d94c2a39b0041bb4911678511c4548566a69d964661d4afc3e7e27997943b875f204c602'

+             '6cb1ac0928ae2da5c69764d45c52a661a6d72698bb9edd6a603580d2f9bd82b59f2a2661e7569ade3a3b729459d115004f251ad6a5eac8cdf1d38c65bfa9349e'

+             'a14e48f014f75c7e611bf2a653d9760804754febd1ae4543f78abbfbe60c79f5aa07c5fd53fe26bb74b48fcb8cb8aa78274771212e41c42db031e8c8ba7e81d2')

+ 

+ package() {

+   for _i in nftables-mk nftables ; do

+     install -Dm755 "$srcdir/$_i.initd" "$pkgdir/etc/init.d/$_i"

+     install -Dm644 "$srcdir/$_i.confd" "$pkgdir/etc/conf.d/$_i"

+   done

+ 

+   install -Dm755 "$srcdir"/nftables-mk.sh "$pkgdir"/usr/lib/nftables/nftables-mk.sh

+   install -Dm755 "$srcdir"/nftables.sh "$pkgdir"/usr/lib/nftables/nftables.sh

+ 

+   sed -e 's|/sbin|/usr/bin|g' -i "$pkgdir"/etc/conf.d/nftables-mk

+   sed -e 's|/sbin|/usr/bin|g' -i "$pkgdir"/usr/lib/nftables/nftables-mk.sh

+ }

@@ -0,0 +1,26 @@ 

+ # /etc/conf.d/nftables

+ 

+ # Location in which nftables initscript will save set rules on

+ # service shutdown

+ NFTABLES_SAVE="/var/lib/nftables/rules-save"

+ 

+ # Options to pass to nft on save

+ SAVE_OPTIONS="-n"

+ 

+ # Save state on stopping nftables

+ SAVE_ON_STOP="yes"

+ 

+ # Only for OpenRC systems.

+ # Set to "hard" or "soft" to panic when stopping instead of

+ # clearing the rules

+ # Soft panic loads a ruleset dropping any new or invalid connections

+ # Hard panic loads a ruleset dropping all traffic

+ PANIC_ON_STOP=""

+ 

+ # If you need to log nftables messages as soon as nftables 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"

@@ -0,0 +1,104 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_commands="check clear list panic save soft_panic"

+ extra_started_commands="reload"

+ 

+ depend() {

+     need localmount #434774

+     before net

+ }

+ 

+ checkkernel() {

+     if ! /sbin/nft list ruleset >/dev/null 2>/dev/null ; then

+         eerror "Your kernel lacks nftables support, please load"

+         eerror "appropriate modules and try again."

+         return 1

+     fi

+     return 0

+ }

+ 

+ checkconfig() {

+     if [ -z "${NFTABLES_SAVE}" -o ! -f "${NFTABLES_SAVE}" ] ; then

+         eerror "Not starting nftables. First create some rules then run:"

+         eerror "/etc/init.d/${SVCNAME} save"

+         return 1

+     fi

+     return 0

+ }

+ 

+ start_pre() {

+     checkconfig || return 1

+     checkkernel || return 1

+     check || return 1

+ }

+ 

+ start() {

+     ebegin "Loading ${SVCNAME} state and starting firewall"

+     /usr/lib/nftables/nftables.sh load "${NFTABLES_SAVE}"

+     eend $?

+ }

+ 

+ stop() {

+     if [ "${SAVE_ON_STOP}" = "yes" ] ; then

+         save || return 1

+     fi

+ 

+     ebegin "Stopping firewall"

+     if [ "${PANIC_ON_STOP}" = "hard" ]; then

+         /usr/lib/nftables/nftables.sh panic

+     elif [ "${PANIC_ON_STOP}" = "soft" ]; then

+         /usr/lib/nftables/nftables.sh soft_panic

+     else

+         /usr/lib/nftables/nftables.sh clear

+     fi

+     eend $?

+ }

+ 

+ reload() {

+     start_pre || return 1

+     start

+ }

+ 

+ clear() {

+     ebegin "Clearing rules"

+     /usr/lib/nftables/nftables.sh clear

+     eend $?

+ }

+ 

+ list() {

+     /usr/lib/nftables/nftables.sh list

+ }

+ 

+ check() {

+     ebegin "Checking rules"

+     /usr/lib/nftables/nftables.sh check "${NFTABLES_SAVE}"

+     eend $?

+ }

+ 

+ save() {

+     ebegin "Saving ${SVCNAME} state"

+     checkpath -q -d "$(dirname "${NFTABLES_SAVE}")"

+     checkpath -q -m 0600 -f "${NFTABLES_SAVE}"

+     /usr/lib/nftables/nftables.sh store "${NFTABLES_SAVE}"

+     eend $?

+ }

+ 

+ panic() {

+     if service_started ${SVCNAME}; then

+         rc-service ${SVCNAME} zap

+     fi

+     ebegin "Dropping all packets"

+     /usr/lib/nftables/nftables.sh panic

+     eend $?

+ }

+ 

+ soft_panic() {

+     if service_started ${SVCNAME}; then

+         rc-service ${SVCNAME} zap

+     fi

+     ebegin "Dropping new connections"

+     /usr/lib/nftables/nftables.sh soft_panic

+     eend $?

+ }

@@ -0,0 +1,60 @@ 

+ #!/bin/sh

+ 

+ main() {

+ 	local NFTABLES_SAVE=${2:-'/var/lib/nftables/rules-save'}

+ 	case "$1" in

+ 		"check")

+ 			nft -c -f "${NFTABLES_SAVE}"

+ 		;;

+ 		"clear")

+ 			nft flush ruleset

+ 		;;

+ 		"list")

+ 			nft ${SAVE_OPTIONS} list ruleset

+ 		;;

+ 		"load")

+ 			# We use an include because cat fails with long rulesets see #675188

+ 			printf 'flush ruleset\ninclude "%s"\n' "${NFTABLES_SAVE}" | nft -f -

+ 		;;

+ 		"panic")

+ 			panic hard | nft -f -

+ 		;;

+ 		"soft_panic")

+ 			panic soft | nft -f -

+ 		;;

+ 		"store")

+ 			local tmp_save="${NFTABLES_SAVE}.tmp"

+ 			umask 177

+ 			(

+ 				printf '#!/sbin/nft -f\nflush ruleset\n'

+ 				nft ${SAVE_OPTIONS} list ruleset

+ 			) > "$tmp_save" && mv ${tmp_save} ${NFTABLES_SAVE}

+ 		;;

+ 	esac

+ }

+ 

+ panic() {

+ 	local erule;

+ 	[ "$1" = soft ] && erule="ct state established,related accept;" || erule="";

+ 	cat <<EOF

+ flush ruleset

+ table inet filter {

+ 	chain input {

+ 		type filter hook input priority 0;

+ 		$erule

+ 		drop

+ 	}

+ 	chain forward {

+ 		type filter hook forward priority 0;

+ 		drop

+ 	}

+ 	chain output {

+ 		type filter hook output priority 0;

+ 		$erule

+ 		drop

+ 	}

+ }

+ EOF

+ }

+ 

+ main "$@"

@@ -0,0 +1,19 @@ 

+ # /etc/conf.d/nftables

+ 

+ # Location in which nftables initscript will save set rules on 

+ # service shutdown

+ NFTABLES_SAVE="/var/lib/nftables/rules-save"

+ 

+ # Options to pass to nft on save

+ SAVE_OPTIONS="-n"

+ 

+ # Save state on stopping nftables

+ SAVE_ON_STOP="yes"

+ 

+ # If you need to log nftables messages as soon as nftables 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"

@@ -0,0 +1,124 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 2014-2017 Nicholas Vinson

+ # Copyright 1999-2017 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_commands="clear list panic save"

+ extra_started_commands="reload"

+ depend() {

+     need localmount #434774

+     before net

+ }

+ 

+ start_pre() {

+     checkkernel || return 1

+     checkconfig || return 1

+     return 0

+ }

+ 

+ clear() {

+     /usr/lib/nftables/nftables.sh clear || return 1

+     return 0

+ }

+ 

+ list() {

+     /usr/lib/nftables/nftables.sh list || return 1

+     return 0

+ }

+ 

+ panic() {

+     checkkernel || return 1

+     if service_started ${RC_SVCNAME}; then

+         rc-service ${RC_SVCNAME} stop

+     fi

+ 

+     ebegin "Dropping all packets"

+     clear

+     if nft create table ip filter >/dev/null 2>&1; then

+ 	nft -f /dev/stdin <<-EOF

+ 	    table ip filter {

+ 	                    chain input {

+ 	                                    type filter hook input priority 0;

+ 	                                    drop

+ 	                    }

+ 	                    chain forward {

+ 	                                    type filter hook forward priority 0;

+ 	                                    drop

+ 	                    }

+ 	                    chain output {

+ 	                                    type filter hook output priority 0;

+ 	                                    drop

+ 	                    }

+ 	    }

+ 	EOF

+     fi

+     if nft create table ip6 filter >/dev/null 2>&1; then

+ 	nft -f /dev/stdin <<-EOF

+ 	    table ip6 filter {

+ 	                    chain input {

+ 	                                    type filter hook input priority 0;

+ 	                                    drop

+ 	                    }

+ 	                    chain forward {

+ 	                                    type filter hook forward priority 0;

+ 	                                    drop

+ 	                    }

+ 	                    chain output {

+ 	                                    type filter hook output priority 0;

+ 	                                    drop

+ 	                    }

+ 	    }

+ 	EOF

+     fi

+ }

+ 

+ reload() {

+     checkkernel || return 1

+     ebegin "Flushing firewall"

+     clear

+     start

+ }

+ 

+ save() {

+     ebegin "Saving nftables state"

+     checkpath -q -d "$(dirname "${NFTABLES_SAVE}")"

+     checkpath -q -m 0600 -f "${NFTABLES_SAVE}"

+     export SAVE_OPTIONS

+     /usr/lib/nftables/nftables.sh store ${NFTABLES_SAVE}

+     return $?

+ }

+ 

+ start() {

+     ebegin "Loading nftables state and starting firewall"

+     clear

+     /usr/lib/nftables/nftables.sh load ${NFTABLES_SAVE}

+     eend $?

+ }

+ 

+ stop() {

+     if yesno ${SAVE_ON_STOP:-yes}; then

+         save || return 1

+     fi

+ 

+     ebegin "Stopping firewall"

+     clear

+     eend $?

+ }

+ 

+ checkconfig() {

+     if [ ! -f ${NFTABLES_SAVE} ]; then

+         eerror "Not starting nftables.  First create some rules then run:"

+         eerror "rc-service nftables save"

+         return 1

+     fi

+     return 0

+ }

+ 

+ checkkernel() {

+     if ! nft list tables >/dev/null 2>&1; then

+         eerror "Your kernel lacks nftables support, please load"

+         eerror "appropriate modules and try again."

+         return 1

+     fi

+     return 0

+ }

@@ -0,0 +1,150 @@ 

+ #! /bin/sh

+ 

+ main() {

+     local NFTABLES_SAVE=${2:-'/var/lib/nftables/rules-save'}

+     local retval

+     case "$1" in

+         "clear")

+             if ! use_legacy; then

+                 nft flush ruleset

+             else

+                 clear_legacy

+             fi

+             retval=$?

+         ;;

+         "list")

+             if ! use_legacy; then

+                 nft list ruleset

+             else

+                 list_legacy

+             fi

+             retval=$?

+         ;;

+         "load")

+             nft -f ${NFTABLES_SAVE}

+             retval=$?

+         ;;

+         "store")

+             umask 177

+             local tmp_save="${NFTABLES_SAVE}.tmp"

+             if ! use_legacy; then

+                 nft ${SAVE_OPTIONS} list ruleset > ${tmp_save}

+             else

+                 save_legacy ${tmp_save}

+             fi

+             retval=$?

+             if [ ${retval} ]; then

+                 mv ${tmp_save} ${NFTABLES_SAVE}

+             fi

+         ;;

+     esac

+     return ${retval}

+ }

+ 

+ clear_legacy() {

+     local l3f line table chain first_line

+ 

+     first_line=1

+     if manualwalk; then

+         for l3f in $(getfamilies); do

+             nft list tables ${l3f} | while read line; do

+                 table=$(echo ${line} | sed "s/table[ \t]*//")

+                 deletetable ${l3f} ${table}

+             done

+         done

+     else

+         nft list tables | while read line; do

+             l3f=$(echo ${line} | cut -d ' ' -f2)

+             table=$(echo ${line} | cut -d ' ' -f3)

+             deletetable ${l3f} ${table}

+         done

+     fi

+ }

+ 

+ list_legacy() {

+     local l3f

+ 

+     if manualwalk; then

+         for l3f in $(getfamilies); do

+             nft list tables ${l3f} | while read line; do

+                 line=$(echo ${line} | sed "s/table/table ${l3f}/")

+                 echo "$(nft list ${line})"

+             done

+         done

+     else

+         nft list tables | while read line; do

+             echo "$(nft list ${line})"

+         done

+     fi

+ }

+ 

+ save_legacy() {

+     tmp_save=$1

+     touch "${tmp_save}"

+     if manualwalk; then

+         for l3f in $(getfamilies); do

+             nft list tables ${l3f} | while read line; do

+                 line=$(echo ${line} | sed "s/table/table ${l3f}/")

+                 nft ${SAVE_OPTIONS} list ${line} >> ${tmp_save}

+             done

+         done

+     else

+         nft list tables | while read line; do

+             nft ${SAVE_OPTIONS} list ${line} >> "${tmp_save}"

+         done

+     fi

+ }

+ 

+ use_legacy() {

+     local major_ver minor_ver

+ 

+     major_ver=$(uname -r | cut -d '.' -f1)

+     minor_ver=$(uname -r | cut -d '.' -f2)

+ 

+     [ $major_ver -ge 4 -o $major_ver -eq 3 -a $minor_ver -ge 18 ] && return 1

+     return 0

+ }

+ 

+ CHECK_TABLE_NAME="GENTOO_CHECK_TABLE"

+ 

+ getfamilies() {

+     local l3f families

+ 

+     for l3f in ip arp ip6 bridge inet; do

+         if nft create table ${l3f} ${CHECK_TABLE_NAME} > /dev/null 2>&1; then

+             families="${families}${l3f} "

+             nft delete table ${l3f} ${CHECK_TABLE_NAME}

+         fi

+     done

+     echo ${families}

+ }

+ 

+ manualwalk() {

+     local result l3f=`getfamilies | cut -d ' ' -f1`

+ 

+     nft create table ${l3f} ${CHECK_TABLE_NAME}

+     nft list tables | read line

+     if [ $(echo $line | wc -w) -lt 3 ]; then

+         result=0

+     fi

+     result=1

+     nft delete table ${l3f} ${CHECK_TABLE_NAME}

+ 

+     return $result

+ }

+ 

+ deletetable() {

+     # family is $1

+     # table name is $2

+     nft flush table $1 $2

+     nft list table $1 $2 | while read l; do

+         chain=$(echo $l | grep -o 'chain [^[:space:]]\+' | cut -d ' ' -f2)

+         if [ -n "${chain}" ]; then

+             nft flush chain $1 $2 ${chain}

+             nft delete chain $1 $2 ${chain}

+         fi

+     done

+     nft delete table $1 $2

+ }

+ 

+ main "$@"

@@ -0,0 +1,21 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=nginx-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC nginx init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'nginx')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/nginx')

+ source=("nginx".{confd,initd})

+ sha512sums=('9023b33b6e03de4fa4df8459118a34a24a52ec167eb0aa1d220fd5ba8555aa454ca3451cad4eecc87a445b74cae5132fd717286aec3f1fea390eb96547e4ae85'

+             '77769a13b3b9d054556fd058bc30f645c17bb73c15c3ac6d3f521a0f331b670da0b2ff3ec11c67c8e7bc1056a98f900ad73f6c1ecbcd2c7937aeb8ac74f77fab')

+ 

+ package() {

+   install -Dm755 "$srcdir"/nginx.initd "$pkgdir"/etc/init.d/nginx

+   install -Dm644 "$srcdir"/nginx.confd "$pkgdir"/etc/conf.d/nginx

+ }

@@ -0,0 +1,32 @@ 

+ # /etc/conf.d/nginx

+ 

+ # Configuration file

+ #NGINX_CONFIGFILE="/etc/nginx/nginx.conf"

+ 

+ # PID file

+ # If you should ever change this, remember to update

+ # "/etc/logrotate.d/nginx", too.

+ #NGINX_PIDFILE="/run/nginx.pid"

+ 

+ # User to run nginx as

+ # If you should ever change this, make sure this user has

+ # execution permission on any of your log directories

+ # (/var/log/nginx per default) but do NOT forget other log directories

+ # one of your vhost(s) maybe using or logging after logrotation will

+ # be broken).

+ #NGINX_USER="nginx"

+ 

+ # Group to run nginx as

+ # See the note above regarding NGINX_USER.

+ #NGINX_GROUP="nginx"

+ 

+ # 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.

+ #NGINX_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.

+ #NGINX_TERMTIMEOUT="TERM/60/KILL/5"

@@ -0,0 +1,92 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2017 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_commands="configtest"

+ extra_started_commands="upgrade reload"

+ 

+ description="Robust, small and high performance http and reverse proxy server"

+ description_configtest="Run nginx' internal config check."

+ description_upgrade="Upgrade the nginx binary without losing connections."

+ description_reload="Reload the nginx configuration without losing connections."

+ 

+ NGINX_CONFIGFILE=${NGINX_CONFIGFILE:-/etc/nginx/nginx.conf}

+ 

+ command="/usr/bin/nginx"

+ command_args="-c \"${NGINX_CONFIGFILE}\""

+ start_stop_daemon_args=${NGINX_SSDARGS:-"--wait 1000"}

+ pidfile=${NGINX_PIDFILE:-/run/nginx.pid}

+ user=${NGINX_USER:-nginx}

+ group=${NGINX_GROUP:-nginx}

+ retry=${NGINX_TERMTIMEOUT:-"TERM/60/KILL/5"}

+ 

+ depend() {

+ 	need net

+ 	use dns logger netmount

+ }

+ 

+ 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 ${pidfile}

+ }

+ 

+ reload() {

+ 	configtest || return 1

+ 	ebegin "Refreshing nginx' configuration"

+ 	start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"

+ 	eend $? "Failed to reload nginx"

+ }

+ 

+ upgrade() {

+ 	configtest || return 1

+ 	ebegin "Upgrading nginx"

+ 

+ 	einfo "Sending USR2 to old binary"

+ 	start-stop-daemon --signal SIGUSR2 --pidfile "${pidfile}"

+ 

+ 	einfo "Sleeping 3 seconds before pid-files checking"

+ 	sleep 3

+ 

+ 	if [ ! -f "${pidfile}.oldbin" ]; then

+ 		eerror "File with old pid not found"

+ 		return 1

+ 	fi

+ 

+ 	if [ ! -f "${pidfile}" ]; then

+ 		eerror "New binary failed to start"

+ 		return 1

+ 	fi

+ 

+ 	einfo "Sleeping 3 seconds before WINCH"

+ 	sleep 3

+ 	# Cannot send "WINCH" using start-stop-daemon yet, https://bugs.gentoo.org/604986

+ 	kill -WINCH $(cat "${pidfile}.oldbin")

+ 

+ 	einfo "Sending QUIT to old binary"

+ 	start-stop-daemon --signal SIGQUIT --pidfile "${pidfile}.oldbin"

+ 

+ 	einfo "Upgrade completed"

+ 	eend $? "Upgrade failed"

+ }

+ 

+ configtest() {

+ 	ebegin "Checking nginx' configuration"

+ 	${command} -c "${NGINX_CONFIGFILE}" -t -q

+ 

+ 	if [ $? -ne 0 ]; then

+ 		${command} -c "${NGINX_CONFIGFILE}" -t

+ 	fi

+ 

+ 	eend $? "failed, please correct errors above"

+ }

@@ -0,0 +1,33 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=ntp-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC ntp init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'ntp')

+ optdepends=('bind-openrc: bind initscript')

+ provides=('openrc-timed')

+ conflicts=('openntpd' 'openntpd-openrc' 'systemd-sysvcompat')

+ backup=('etc/conf.d/ntpd'

+         'etc/conf.d/ntp-client'

+         'etc/init.d/sntp')

+ source=("ntpd".{initd,confd}

+         "ntp-client".{initd,confd}

+         "sntp".{initd,confd})

+ sha512sums=('0f8d2896c720c670d245503152cbd673f85b2bcfca6731967ac73c8014a1dcb11ca73a127e87efd5d3c080ee4bb7e38ae34003541a55c85fb9d6cdefcd109cd1'

+             'a9e96a214d3c21a3f4863709c48a11f9dedc73e2d83a9b20761021df44a9acb56757e77f113aa0314f5f3923e9cb26bc6e0147658d20e8a74d078d415a171d91'

+             '00b5510fce363c88414f2f38b1dfa130dffdb55cc2816a3f809297f0785a6ff00b8b732684dca1960da98140bf8ad133662da0feca05bc5f0c2eee47fcc38dee'

+             '2d6b9d96c55787cf4556332054a61399368dcf37cf76a14aaba3f8e2e4fdd47ce25808f9babda2ca1f2a6e7387c043e023251ba2b99786426c875bd7cb6592a6'

+             'c6e4dfdc20cc472bd5582351b3aa84841ef254b9f33e43177557f5aed152bc6616fcb060928622806f45c28ca86b420cde7efa1359d3295712d1fe40376a6d51'

+             '28c8f1fd3a69bbdfacc2379a3ce01f254ae21fd8b91d893600086d27e5fb9cccf05d1bf62022ab26fcb53fa2080d4178961619811fd7a56f4e7502893f8ea13b')

+ 

+ package() {

+   for _i in ntp-client ntpd sntp ; do

+     install -Dm755 "$srcdir/$_i.initd" "$pkgdir/etc/init.d/$_i"

+     install -Dm644 "$srcdir/$_i.confd" "$pkgdir/etc/conf.d/$_i"

+   done

+ }

@@ -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"

@@ -0,0 +1,31 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2013 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ 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"

+ }

@@ -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"

@@ -0,0 +1,25 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ description="ntpd - the network time protocol daemon"

+ #pidfile="/run/ntpd.pid"

+ command="/usr/bin/ntpd"

+ #command_args_background="-p ${pidfile}"

+ command_args="${NTPD_OPTS}"

+ #start_stop_daemon_args="--pidfile ${pidfile}"

+ supervisor="supervise-daemon"

+ command_args_foreground="-n"

+ 

+ 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

+ }

@@ -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"

@@ -0,0 +1,26 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ command="/usr/bin/sntp"

+ 

+ depend() {

+ 	before cron portmap

+ 	after net

+ 	use dns logger

+ }

+ 

+ start_pre() {

+ 	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() {

+ 	ebegin "Setting clock via SNTP"

+ 	${command} ${SNTP_OPTS}

+ 	eend $? "Failed to set clock"

+ }

@@ -0,0 +1,18 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=opendkim-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC opendkim init script"

+ arch=('any')

+ license=('GPL2')

+ depends=('opendkim' 'openrc')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/opendkim')

+ source=('opendkim.initd')

+ sha512sums=('8776981b3e952fa544c84134876d4ddecc96bb954bb79174a4a60b4af6d0ed9deffa5eea5595dc6421bfad0e2b5f8f163a2448a2583563023e8c761f6f720f37')

+ 

+ package() {

+   install -Dm755 "$srcdir"/opendkim.initd "$pkgdir"/etc/init.d/opendkim

+ }

@@ -0,0 +1,54 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ CONFFILE="/etc/opendkim/${RC_SVCNAME}.conf"

+ required_files="${CONFFILE}"

+ 

+ command="/usr/bin/opendkim"

+ pidfile="/run/${RC_SVCNAME}.pid"

+ command_args="-P ${pidfile} -x ${CONFFILE}"

+ extra_commands="checkconfig"

+ 

+ depend() {

+ 	use dns logger net

+ 	before mta

+ }

+ 

+ checkconfig() {

+ 	#

+ 	# The opendkim.conf man page says,

+ 	#

+ 	#   For parameters that are Boolean in nature, only the first byte

+ 	#   of the value is processed... For negative values, the following

+ 	#   are accepted: "F", "f", "N", "n", "0".'

+ 	#

+ 	if @GREP@ '^[[:space:]]*Background[[:space:]]\+[FfNn0]' "${CONFFILE}" \

+ 		>/dev/null 2>&1; then

+ 		eend 1 "${RC_SVCNAME} cannot run in the foreground!"

+ 	fi

+ 	if ! "${command}" -n "${command_args}"; then

+ 		eend 1 "${RC_SVCNAME} configuration check failed"

+ 	fi

+ }

+ 

+ start_pre() {

+ 	# If this isn't a restart, make sure that the user's config isn't

+ 	# busted before we try to start the daemon (this will produce

+ 	# better error messages than if we just try to start it blindly).

+ 	#

+ 	# If, on the other hand, this *is* a restart, then the stop_pre

+ 	# action will have ensured that the config is usable and we don't

+ 	# need to do that again.

+ 	if [ "${RC_CMD}" != "restart" ]; then

+ 		checkconfig || return $?

+ 	fi

+ }

+ 

+ stop_pre() {

+ 	# If this is a restart, check to make sure the user's config

+ 	# isn't busted before we stop the running daemon.

+ 	if [ "${RC_CMD}" = "restart" ]; then

+ 		checkconfig || return $?

+ 	fi

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=opendmarc-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC opendmarc init script"

+ url="https://gitweb.gentoo.org/repo/gentoo.git/tree/mail-filter/opendmarc"

+ arch=('any')

+ license=('GPL2')

+ depends=('opendkim' 'openrc')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/opendkim')

+ source=('opendmarc.initd'

+         'opendmarc.confd')

+ sha512sums=('7d5253a32b324684500c8a4d9fb18991280fb2b58489f88935ac2af0f2962e9b25ecfa9e9de384d58710286aa51c3731ca1e383eb40f5008af78300fcb1c45b6'

+             '2febb226e9495835c515d92c8e7cbb85db3c08ac287a7449d8117b5e9533902d8b3d190fa8face4b69f4cf0c0ede5d860a8b5f97d776c6d7d95bf9f196eb67e2')

+ 

+ package() {

+   install -Dm755 "$srcdir"/opendmarc.initd "$pkgdir"/etc/init.d/opendmarc

+   install -Dm644 "$srcdir"/opendmarc.confd "$pkgdir"/etc/conf.d/opendmarc

+ }

@@ -0,0 +1,3 @@ 

+ # user/group to run opendmarc daemon as

+ OPENDMARC_USER=opendmarc

+ OPENDMARC_GROUP=opendmarc

@@ -0,0 +1,54 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2017 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ CONFFILE="/etc/opendmarc/${SVCNAME}.conf"

+ 

+ depend() {

+ 	use dns logger net

+ 	before mta

+ }

+ 

+ check_cfg() {

+ 	if [ ! -f "${CONFFILE}" ] ; then

+ 		eerror "Configuration file ${CONFFILE} is missing"

+ 		return 1

+ 	fi

+ 	# create /run/opendmarc

+ 	mkdir -p /run/opendmarc > /dev/null 2>&1

+ 	chown ${OPENDMARC_USER}:${OPENDMARC_GROUP} \

+ 		/run/opendmarc > /dev/null 2>&1

+ 	PIDFILE=$(sed -ne 's/^[[:space:]]*PidFile[[:space:]]\+//p' "${CONFFILE}")

+ 	local PIDDIR="${PIDFILE%/*}"

+ 	if [ ! -d  "${PIDDIR}" ] ; then

+ 		checkpath -q -d -o ${OPENDMARC_USER}:${OPENDMARC_GROUP} -m 0755 "${PIDDIR}" || return 1

+ 	fi

+ 	if [ -z "${PIDFILE}" ] ; then

+ 		eerror "Configuration file needs PidFile setting - recommend adding 'PidFile /run/opendmarc/${SVCNAME}.pid' to ${CONFFILE}"

+ 		return 1

+ 	fi

+ 	if egrep -q '^[[:space:]]*Background[[:space:]]+false' "${CONFFILE}" ; then

+ 		eerror "${SVCNAME} service cannot run with Background key set to false!"

+ 		return 1

+ 	fi

+ 

+ 	ebegin "Checking your configfile (${CONFFILE})"

+ 	opendmarc -c "${CONFFILE}" -n

+ 	eend $? "Configuration error. Please fix your configfile (${CONFFILE})"

+ }

+ 

+ start() {

+ 	check_cfg || return 1

+ 	

+ 	ebegin "Starting OpenDMARC"

+ 	start-stop-daemon --start --pidfile "${PIDFILE}" \

+ 		--exec /usr/bin/opendmarc -- -c "${CONFFILE}"

+ 	eend $?

+ }

+ 

+ stop() {

+ 	check_cfg || return 1

+ 	ebegin "Stopping OpenDMARC"

+ 	start-stop-daemon --stop --pidfile "${PIDFILE}"

+ 	eend $?

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=openldap-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC openldap init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'openldap')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/slapd')

+ source=("slapd.confd"

+         "slapd.initd")

+ sha512sums=('e4ae52d10294da787016cf39adfd68c6ad812ac1758b00845810ee7936d21734d2ef3793252b878d88f21788414071adffb5f484381d4dc6a29f71a8729486b7'

+             'f3beac99fb79130f420caf169a18404b76bf55af83c9266bb8651a3e2a84fef72f2451554c59c3d008f6af6211a84cbab5904541b635e7bf1730ae6a8cdbedf8')

+ 

+ package() {

+   install -Dm644 "${srcdir}"/slapd.confd "${pkgdir}"/etc/conf.d/slapd

+   install -Dm755 "${srcdir}"/slapd.initd "${pkgdir}"/etc/init.d/slapd

+ }

@@ -0,0 +1,14 @@ 

+ # conf.d file for openldap

+ #

+ # To enable both the standard unciphered server and the ssl encrypted

+ # one uncomment this line or set any other server starting options

+ # you may desire.

+ #

+ # OPTS="-h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"

+ # Uncomment the below to use the new slapd configuration for openldap 2.3

+ #OPTS="-F /etc/openldap/slapd.d -h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"

+ #

+ # If you change the above listen statement to bind on a specific IP for

+ # listening, you should ensure that interface is up here (change eth0 as

+ # needed).

+ #rc_need="net.eth0"

@@ -0,0 +1,64 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2015 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_commands="checkconfig"

+ 

+ [ -z "$INSTANCE" ] && INSTANCE="openldap${SVCNAME#slapd}"

+ PIDDIR=/run/openldap

+ PIDFILE=$PIDDIR/$SVCNAME.pid

+ 

+ depend() {

+ 	need net

+ 	before dbus hald avahi-daemon

+ 	provide ldap

+ }

+ 

+ start() {

+ 	checkpath -q -d ${PIDDIR} -o ldap:ldap 

+ 	if ! checkconfig -Q ; then

+ 		eerror "There is a problem with your slapd.conf!"

+ 		return 1

+ 	fi

+ 	ebegin "Starting ldap-server"

+ 	[ -n "$KRB5_KTNAME" ] && export KRB5_KTNAME

+ 	eval start-stop-daemon --start --pidfile ${PIDFILE} --exec /usr/lib/openldap/slapd -- -u ldap -g ldap "${OPTS}"

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping ldap-server"

+ 	start-stop-daemon --stop --signal 2 --quiet --pidfile ${PIDFILE}

+ 	eend $?

+ }

+ 

+ checkconfig() {

+ 	# checks requested by bug #502948

+ 	# Step 1: extract the last valid config file or config dir

+ 	set -- $OPTS

+ 	while [ -n "$*" ]; do

+ 		opt=$1 ; shift

+ 		if [ "$opt" = "-f" -o "$opt" = "-F" ] ; then

+ 			CONF=$1

+ 			shift

+ 		fi

+ 	done

+ 	set --

+ 	# Fallback

+ 	CONF=${CONF-/etc/openldap/slapd.conf}

+ 	[ -d $CONF ] && CONF=${CONF}/*

+ 	DBDIRS=`eval awk '"/^(directory|olcDbDirectory:)/{print \\$2}"' $CONF`

+ 	for d in $DBDIRS; do

+ 		if [ ! -d $d ]; then

+ 			eerror "Directory $d in config does not exist!"

+ 			return 1

+ 		fi

+ 		/usr/bin/find $d ! -name DB_CONFIG ! -user ldap -o ! -group ldap |grep -sq .

+ 		if [ $? -ne 0 ]; then

+ 			ewarn "You have files in $d not owned by the ldap user, you must ensure they are accessible to the slapd instance!"

+ 		fi

+ 		[ ! -e $d/DB_CONFIG ] && ewarn "$d/DB_CONFIG does not exist, slapd performance may be sub-optimal"

+ 	done

+ 	# now test the config fully

+ 	/usr/bin/slaptest -u "$@" ${OPTS_CONF}

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=openntpd-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC openntpd init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'openntpd')

+ provides=('openrc-timed')

+ conflicts=('ntp' 'ntp-openrc' 'systemd-sysvcompat')

+ backup=('etc/conf.d/ntpd')

+ source=("ntpd".{confd,initd})

+ sha512sums=('016094e0ac80817c8c1eb8a52a527c8a673b3ee904f2c04bef0304b5dfe1c778a34a2d5321cc5540a1dfe2e14dc878c44a1e54fd0263aca3917600827c6d9059'

+             '9f83b025eb24d2a83384ffce78f92a97645c75e1efa6c8c8bcf84756fb3a4e4917a5526291aa7ddf1d531ab7b3987f949d88f1fcacaef7e177fa899b802fb77d')

+ 

+ package() {

+     install -Dm755 "$srcdir"/ntpd.initd "$pkgdir"/etc/init.d/ntpd

+     install -Dm644 "$srcdir"/ntpd.confd "$pkgdir"/etc/conf.d/ntpd

+ }

@@ -0,0 +1,7 @@ 

+ # /etc/conf.d/ntpd: config file for openntpd's ntpd

+ 

+ # See ntpd(8) man page ... some popular options:

+ #  -s   Set the time immediately at startup

+ #       (Note: may cause up to a 15 second startup delay

+ #        if ntp servers not reachable)

+ NTPD_OPTS=""

@@ -0,0 +1,14 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2013 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ supervisor=supervise-daemon

+ name="OpenNTPD"

+ command="/usr/bin/ntpd"

+ command_args="${NTPD_OPTS} -d"

+ 

+ depend() {

+ 	need net

+ 	after ntp-client

+ 	use dns logger

+ }

file modified
+5 -28
@@ -9,42 +9,28 @@ 

  pkgbase=openrc

  pkgname=('openrc' 'openrc-bash-completions' 'openrc-zsh-completions'

           'openrc-init' 'openrc-sysvinit' 'openrc-net')

- pkgver=0.42.1

- pkgrel=7

+ pkgver=0.43.3

+ pkgrel=1

  pkgdesc="Gentoo's universal init system"

  arch=('x86_64' 'i686' 'armv7h')

  url="https://github.com/OpenRC/openrc"

  license=('BSD2')

  source=("${pkgbase}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz"

-         "revert.patch::${url}/commit/1801561c2d36c330df7fd02c7508f503a61ff5ba.patch"

          "${pkgbase}.logrotate"

          'openrc-hook'

          '30-openrc-upgrade.hook'

          '30-sysctl.hook'

          'sysctl.conf'

          '30-binfmt.hook'

-         'kmod-static-nodes.initd'

-         gcc-10-fix.patch::${url}/commit/375ef42393f3dc6edbaa2cb70c79b2366072db38.patch

-         supervise-daemon-fix.patch::${url}/commit/6deda13754f1b60245945e953cce8d97e40e86fc.patch

-         openrc-shutdown-fix.patch::${url}/commit/fd852865e06a74ecf8b77ff534fa8053e020160f.patch

-         posix-compliant-grep.patch::${url}/commit/a7e7fd2b37a7666f26c2d4de9386b2d04f583b41.patch

-         binfmt-fix.patch::${url}/commit/eb610859519292c6164c4ba601d22e642c306beb.patch

-         cgroup2-verify.patch::${url}/commit/87cfad3d6cd619c6090e8209092448ae68279b0c.patch)

- sha256sums=('91a01ca6d930a0688fb91338209985de57cac7aa2d37feddacb78fd3d95308e2'

-             '5211012d0e1bdfc1a32113cee5a2eec3a2be4b3549f88216cdecbadd6ca46d81'

+         'kmod-static-nodes.initd')

+ sha256sums=('968e81743a1de7a2348590b3b3286d6af5baf96da28fa1e6364e24f8203fc3b6'

              '0b44210db9770588bd491cd6c0ac9412d99124c6be4c9d3f7d31ec8746072f5c'

              '7de1e65f48ba31fc015cfb77be167b41aabdf0f20cb6617ecf3f4c3ca434c9e8'

              'a3fda2186e023ae60c0e0d3806ffeb95effe675acea03cdfd0bf30e8f1c188d4'

              '28ec075d30096bd54499e994f76f8526460474f1e4c33607045c1a71b0684263'

              '860d5b9ae60e13633bd94023c222fa1ef918a02db3ce2e3255cdd6bb9eef047e'

              '28aa413fd78bca98bb23294eeb3f49149825a2c2f97a7ee10039385f5e8e50e9'

-             '3ecbe7761b92a123a5a3d395ec3d9e090b0dfba7910a5987b4a2298c20a7e571'

-             'addb1bf115b811fba3d120f5c68535ec07f32a55e570b661f1e5575f74327bac'

-             '654dada5ffe56d6ae10d0ea4f9cb62c8c6c39a5398cd02561419a8bbf3f686b7'

-             '5576a8b6c9fbe79ede027ed053f922da60d1cbe818803677f5aa5532f98ffac4'

-             '46f6e809aabb629212a739af7f5177930e9c4a7f2adfdfc59911d778d3716ec9'

-             '7e5d7dc888327ef99637fa7207ac9470d72cc37198ddd7ba2cdf72d10a1c7031'

-             '41c6598da76bcdcdc8d9349f559bc6b587a6f6dec55bf7c79669af2b28af43e1')

+             '3ecbe7761b92a123a5a3d395ec3d9e090b0dfba7910a5987b4a2298c20a7e571')

  

  _args=(

      BRANDING='Parabola GNU/Linux-libre'
@@ -64,15 +50,6 @@ 

  prepare(){

      cd "${srcdir}/${pkgbase}-${pkgver}"

      sed -i 's:0444:0644:' mk/sys.mk

-     patch -Np 1 -i ../gcc-10-fix.patch

-     patch -Np 1 -i ../supervise-daemon-fix.patch

-     patch -Np 1 -i ../openrc-shutdown-fix.patch

-     patch -Np 1 -i ../posix-compliant-grep.patch

-     patch -Np 1 -i ../binfmt-fix.patch

-     patch -Np 1 -i ../cgroup2-verify.patch

- 

-     # make bootmisc work with sysvinit too

-     patch -RNp1 -i ../revert.patch

  }

  

  check(){

@@ -0,0 +1,18 @@ 

+ # Maintainer: Nathan Owens <ndowens@artixlinux.org>

+ 

+ pkgname=opensmtpd-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC opensmtpd init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'opensmtpd')

+ conflicts=('systemd-sysvcompat')

+ source=(opensmtpd.initd)

+ b2sums=('2b08eae5ccfc3578c495c18baa336892441b5bcea2b4a97597298efa685768d3377c5180c082329649acb14f47b4fc085cb6b1b43b6c00b57309743e626867f9')

+ 

+ package() {

+   install -Dm755 "$srcdir/opensmtpd.initd" "$pkgdir/etc/init.d/opensmtpd"

+ }

@@ -0,0 +1,27 @@ 

+ #!/usr/bin/openrc-run

+ 

+ extra_commands="checkconfig"

+ description_checkconfig="Check the configuration file for validity"

+ 

+ name="OpenSMTPD"

+ 

+ supervisor=supervise-daemon

+ command=/usr/bin/smtpd

+ command_args="-F ${command_args:-$SMTPD_OPTS}"  # SMTPD_OPTS is deprecated

+ required_files=/etc/smtpd/smtpd.conf

+ 

+ depend() {

+ 	need net localmount

+ 	after bootmisc firewall

+ 	use logger dns

+ 	provide mta

+ }

+ 

+ start_pre() {

+ 	# Don't output anything unless something is *not* ok.

+ 	output=$($command -n 2>&1)

+ 	ret=$?

+ 

+ 	[ $ret -ne 0 ] && echo "$output" 1>&2

+ 	return "$ret"

+ }

@@ -0,0 +1,23 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=openssh-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC openssh init script"

+ arch=('any')

+ url="https://github.com/artix-linux/packages"

+ license=('GPL2')

+ depends=('openrc' 'openssh')

+ optdepends=('bind-openrc: bind initscript')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/sshd')

+ source=("sshd.confd"

+         "sshd.initd")

+ sha512sums=('400900b659b7a056e430e130425719db81df5efaa30eac37d4df7c01a21bdad59b74fc8b105607d357554e8647ffbf67fd220049b87af1db78045a9e94abade2'

+             '142949695f02598a4a0a3fb4bc1b3f4ddbec27e2babea1e895e12cc2d5fe58a30b7ee4b157f85f456f8051dbe22f3d389b0a605c54a34b5e43cb3925f1a4a7b6')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/sshd.initd "${pkgdir}"/etc/init.d/sshd

+   install -Dm644 "${srcdir}"/sshd.confd "${pkgdir}"/etc/conf.d/sshd

+ }

@@ -0,0 +1,33 @@ 

+ # /etc/conf.d/sshd: config file for /etc/init.d/sshd

+ 

+ # Where is your sshd_config file stored?

+ 

+ SSHD_CONFDIR="${RC_PREFIX%/}/etc/ssh"

+ 

+ 

+ # Any random options you want to pass to sshd.

+ # See the sshd(8) manpage for more info.

+ 

+ SSHD_OPTS=""

+ 

+ 

+ # Wait one second (length chosen arbitrarily) to see if sshd actually

+ # creates a PID file, or if it crashes for some reason like not being

+ # able to bind to the address in ListenAddress.

+ 

+ #SSHD_SSD_OPTS="--wait 1000"

+ 

+ 

+ # Pid file to use (needs to be absolute path).

+ 

+ #SSHD_PIDFILE="${RC_PREFIX%/}/run/sshd.pid"

+ 

+ 

+ # Path to the sshd binary (needs to be absolute path).

+ 

+ #SSHD_BINARY="${RC_PREFIX%/}/usr/bin/sshd"

+ 

+ 

+ # Path to the ssh-keygen binary (needs to be absolute path).

+ 

+ #SSHD_KEYGEN_BINARY="${RC_PREFIX%/}/usr/bin/ssh-keygen"

@@ -0,0 +1,94 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_commands="checkconfig"

+ extra_started_commands="reload"

+ 

+ : ${SSHD_CONFDIR:=${RC_PREFIX%/}/etc/ssh}

+ : ${SSHD_CONFIG:=${SSHD_CONFDIR}/sshd_config}

+ : ${SSHD_PIDFILE:=${RC_PREFIX%/}/run/${SVCNAME}.pid}

+ : ${SSHD_BINARY:=${RC_PREFIX%/}/usr/bin/sshd}

+ : ${SSHD_KEYGEN_BINARY:=${RC_PREFIX%/}/usr/bin/ssh-keygen}

+ 

+ command="${SSHD_BINARY}"

+ # pidfile="${SSHD_PIDFILE}"

+ # command_args="${SSHD_OPTS} -o PidFile=${pidfile} -f ${SSHD_CONFIG}"

+ #command_args_background="-o PidFile=${pidfile}"

+ command_args="${SSHD_OPTS} -f ${SSHD_CONFIG}"

+ command_args_foreground="-D"

+ supervisor="supervise-daemon"

+ 

+ 

+ # Wait one second (length chosen arbitrarily) to see if sshd actually

+ # creates a PID file, or if it crashes for some reason like not being

+ # able to bind to the address in ListenAddress (bug 617596).

+ #: ${SSHD_SSD_OPTS:=--wait 1000}

+ start_stop_daemon_args="${SSHD_SSD_OPTS}"

+ 

+ depend() {

+ 	# Entropy can be used by ssh-keygen, among other things, but

+ 	# is not strictly required (bug 470020).

+ 	use logger dns entropy

+ 	if [ "${rc_need+set}" = "set" ] ; then

+ 		: # Do nothing, the user has explicitly set rc_need

+ 	else

+ 		local x warn_addr

+ 		for x in $(awk '/^ListenAddress/{ print $2 }' "$SSHD_CONFIG" 2>/dev/null) ; do

+ 			case "${x}" in

+ 				0.0.0.0|0.0.0.0:*) ;;

+ 				::|\[::\]*) ;;

+ 				*) warn_addr="${warn_addr} ${x}" ;;

+ 			esac

+ 		done

+ 		if [ -n "${warn_addr}" ] ; then

+ 			need net

+ 			ewarn "You are binding an interface in ListenAddress statement in your sshd_config!"

+ 			ewarn "You must add rc_need=\"net.FOO\" to your ${RC_PREFIX%/}/etc/conf.d/sshd"

+ 			ewarn "where FOO is the interface(s) providing the following address(es):"

+ 			ewarn "${warn_addr}"

+ 		fi

+ 	fi

+ }

+ 

+ checkconfig() {

+ 	checkpath --mode 0755 --directory "${RC_PREFIX%/}/var/empty"

+ 

+ 	if [ ! -e "${SSHD_CONFIG}" ] ; then

+ 		eerror "You need an ${SSHD_CONFIG} file to run sshd"

+ 		eerror "There is a sample file in /usr/share/doc/openssh"

+ 		return 1

+ 	fi

+ 

+ 	${SSHD_KEYGEN_BINARY} -A || return 2

+ 

+ 	"${command}" -t ${command_args} || return 3

+ }

+ 

+ start_pre() {

+ 	# Make sure that the user's config isn't busted before we try

+ 	# to start the daemon (this will produce better error messages

+ 	# than if we just try to start it blindly).

+ 	#

+ 	# We always need to call checkconfig because this function will

+ 	# also generate any missing host key and you can start a

+ 	# non-running service with "restart" argument.

+ 	checkconfig || return $?

+ }

+ 

+ stop_pre() {

+ 	# If this is a restart, check to make sure the user's config

+ 	# isn't busted before we stop the running daemon.

+ 	if [ "${RC_CMD}" = "restart" ] ; then

+ 		checkconfig || return $?

+ 	fi

+ }

+ 

+ reload() {

+ 	checkconfig || return $?

+ 	ebegin "Reloading ${SVCNAME}"

+ 	#start-stop-daemon --signal HUP --pidfile "${pidfile}"

+ 	${supervisor} ${SVCNAME} --signal HUP --pidfile "${SSHD_PIDFILE}"

+ 	eend $?

+ }

+ 

@@ -0,0 +1,21 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=openvpn-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC openvpn init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'openvpn')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/openvpn')

+ source=("openvpn".{confd,initd})

+ sha512sums=('982ade883afbe2e656a9cbbe36c31c0e8b4f7bbbe5b63df9f7b834f02a9153032fb7445c85d3e91f62c68a7ddd13c3afbf420fb71cdd13d9c4b69f867bdd9f37'

+             '3f1e96e0469766ae2a723f6269d5c297eae68e419bbe0c0327c40324aeed825e7c30cf92370985491219c3e420cc2a3a96bf60cb228c472d1046c9f139fd3e21')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/openvpn.initd "${pkgdir}"/etc/init.d/openvpn

+   install -Dm644 "${srcdir}"/openvpn.confd "${pkgdir}"/etc/conf.d/openvpn

+ }

@@ -0,0 +1,18 @@ 

+ # OpenVPN automatically creates an /etc/resolv.conf (or sends it to

+ # resolvconf) if given DNS information by the OpenVPN server.

+ # Set PEER_DNS="no" to stop this.

+ PEER_DNS="yes"

+ 

+ # OpenVPN can run in many modes. Most people will want the init script

+ # to automatically detect the mode and try and apply a good default

+ # configuration and setup scripts. However, there are cases where the

+ # OpenVPN configuration looks like a client, but it's really a peer or

+ # something else. DETECT_CLIENT controls this behaviour.

+ DETECT_CLIENT="yes"

+ 

+ # If DETECT_CLIENT is no and you have your own scripts to re-enter the openvpn

+ # init script (ie, it first becomes "inactive" and the script then starts the

+ # script again to make it "started") then you can state this below.

+ # In other words, unless you understand service dependencies and are a

+ # competent shell scripter, don't set this.

+ RE_ENTER="no"

@@ -0,0 +1,133 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2007 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ VPNDIR=${VPNDIR:-/etc/openvpn}

+ VPN=${SVCNAME#*.}

+ if [ -n "${VPN}" ] && [ ${SVCNAME} != "openvpn" ]; then

+ 	VPNPID="/run/openvpn.${VPN}.pid"

+ else

+ 	VPNPID="/run/openvpn.pid"

+ fi

+ VPNCONF="${VPNDIR}/${VPN}.conf"

+ 

+ depend() {

+ 	need localmount net

+ 	use dns

+ 	after bootmisc

+ }

+ 

+ checkconfig() {

+ 	# Linux has good dynamic tun/tap creation

+ 	if [ $(uname -s) = "Linux" ] ; then

+ 		if [ ! -e /dev/net/tun ]; then

+ 			if ! modprobe tun ; then

+ 				eerror "TUN/TAP support is not available" \

+ 					"in this kernel"

+ 				return 1

+ 			fi

+ 		fi

+ 		if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then

+ 			ebegin "Detected broken /dev/net/tun symlink, fixing..."

+ 			rm -f /dev/net/tun

+ 			ln -s /dev/misc/net/tun /dev/net/tun

+ 			eend $?

+ 		fi

+ 		return 0

+ 	fi

+ 

+ 	# Other OS's don't, so we rely on a pre-configured interface

+ 	# per vpn instance

+ 	local ifname=$(sed -n -e 's/[[:space:]]*dev[[:space:]][[:space:]]*\([^[:space:]]*\).*/\1/p' "${VPNCONF}")

+ 	if [ -z ${ifname} ] ; then

+ 		eerror "You need to specify the interface that this openvpn" \

+ 			"instance should use" \

+ 			"by using the dev option in ${VPNCONF}"

+ 		return 1

+ 	fi

+ 

+ 	if ! ifconfig "${ifname}" >/dev/null 2>/dev/null ; then

+ 		# Try and create it

+ 		echo > /dev/"${ifname}" >/dev/null

+ 	fi

+ 	if ! ifconfig "${ifname}" >/dev/null 2>/dev/null ; then

+ 		eerror "${VPNCONF} requires interface ${ifname}" \

+ 			"but that does not exist"

+ 		return 1

+ 	fi

+ }

+ 

+ start() {

+ 	# If we are re-called by the openvpn gentoo-up.sh script

+ 	# then we don't actually want to start openvpn

+ 	[ "${IN_BACKGROUND}" = "true" ] && return 0

+ 

+ 	ebegin "Starting ${SVCNAME}"

+ 

+ 	checkconfig || return 1

+ 

+ 	local args="" reenter=${RE_ENTER:-no}

+ 	# If the config file does not specify the cd option, we do

+ 	# But if we specify it, we override the config option which we do not want

+ 	if ! grep -q "^[ 	]*cd[ 	].*" "${VPNCONF}" ; then

+ 		args="${args} --cd ${VPNDIR}"

+ 	fi

+ 

+ 	# We mark the service as inactive and then start it.

+ 	# When we get an authenticated packet from the peer then we run our script

+ 	# which configures our DNS if any and marks us as up.

+ 	if [ "${DETECT_CLIENT:-yes}" = "yes" ] && \

+ 	grep -q "^[ 	]*remote[ 	].*" "${VPNCONF}" ; then

+ 		reenter="yes"

+ 		args="${args} --up-delay --up-restart"

+ 		args="${args} --script-security 2"

+ 		args="${args} --up /etc/openvpn/up.sh"

+ 		args="${args} --down-pre --down /etc/openvpn/down.sh"

+ 

+ 		# Warn about setting scripts as we override them

+ 		if grep -Eq "^[ 	]*(up|down)[ 	].*" "${VPNCONF}" ; then

+ 			ewarn "WARNING: You have defined your own up/down scripts"

+ 			ewarn "As you're running as a client, we now force Gentoo specific"

+ 			ewarn "scripts to be run for up and down events."

+ 			ewarn "These scripts will call /etc/openvpn/${SVCNAME}-{up,down}.sh"

+ 			ewarn "where you can put your own code."

+ 		fi

+ 

+ 		# Warn about the inability to change ip/route/dns information when

+ 		# dropping privs

+ 		if grep -q "^[ 	]*user[ 	].*" "${VPNCONF}" ; then

+ 			ewarn "WARNING: You are dropping root privileges!"

+ 			ewarn "As such openvpn may not be able to change ip, routing"

+ 			ewarn "or DNS configuration."

+ 		fi

+ 	else

+ 		# So we're a server. Run as openvpn unless otherwise specified

+ 		grep -q "^[ 	]*user[ 	].*" "${VPNCONF}" || args="${args} --user openvpn"

+ 		grep -q "^[ 	]*group[ 	].*" "${VPNCONF}" || args="${args} --group openvpn"

+ 	fi

+ 

+ 	# Ensure that our scripts get the PEER_DNS variable

+ 	[ -n "${PEER_DNS}" ] && args="${args} --setenv PEER_DNS ${PEER_DNS}"

+ 

+ 	[ "${reenter}" = "yes" ] && mark_service_inactive "${SVCNAME}"

+ 	start-stop-daemon --start --exec /usr/bin/openvpn --pidfile "${VPNPID}" \

+ 		-- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon \

+ 		--setenv SVCNAME "${SVCNAME}" ${args}

+ 	eend $? "Check your logs to see why startup failed"

+ }

+ 

+ stop() {

+ 	# If we are re-called by the openvpn gentoo-down.sh script

+ 	# then we don't actually want to stop openvpn

+ 	if [ "${IN_BACKGROUND}" = "true" ] ; then

+ 		mark_service_inactive "${SVCNAME}"

+ 		return 0

+ 	fi

+ 

+ 	ebegin "Stopping ${SVCNAME}"

+ 	start-stop-daemon --stop --quiet \

+ 		--exec /usr/bin/openvpn --pidfile "${VPNPID}"

+ 	eend $?

+ }

+ 

+ # vim: set ts=4 :

@@ -0,0 +1,21 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=pcsclite-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC pcsclite init script"

+ arch=('any')

+ url="https://gitea.artlxinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'pcsclite')

+ conflicts=('systemd-sysvcompat')

+ source=("pcscd.initd"

+         "pcscd.confd")

+ sha512sums=('2b13593cb8f5e4f6b8747bd7c5c740f3529303832acbeb58eef5aab697c4cb791eedeec7df24d01a757455767b6270a3ade0ca54c4cf13e2eb5d797f0e56c20f'

+             '7d5afb0e4051b910a389fc0a0832cd8e5b5df6e5dfcbc09378ecebb455b1d126434407f07850454e8cf1a8c4093e9a005b45ae39354adb79ba83b11e7ef68106')

+ 

+ package() {

+   install -Dm755 "$srcdir/pcscd.initd" "$pkgdir/etc/init.d/pcscd"

+   install -Dm644 "$srcdir/pcscd.confd" "$pkgdir/etc/conf.d/pcscd"

+ }

@@ -0,0 +1,7 @@ 

+ # config file for /etc/conf.d/pcscd

+ 

+ EXTRA_OPTS=""

+ 

+ PCSCD_USER="root"

+ 

+ PCSCD_GROUP="root"

@@ -0,0 +1,22 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2014 Gentoo Foundation

+ # Copyright 2019 Artix Linux

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ name="PC/SC Daemon"

+ 

+ supervisor=supervise-daemon

+ command=/usr/bin/pcscd

+ command_args="${EXTRA_OPTS} -f"

+ command_user="${PCSCD_USER}:${PCSCD_GROUP}"

+ 

+ depend() {

+     need localmount

+     after udev openct dbus

+     use logger

+ }

+ 

+ start_pre() {

+     checkpath -d -m 0755 -o "$command_user" /run/pcscd

+ }

+ 

@@ -0,0 +1,19 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=php-fpm-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC php fpm init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'php-fpm')

+ conflicts=('systemd-sysvcompat')

+ source=("php-fpm.initd")

+ sha512sums=('977959dd682ae98b9fe88dc644f34e16b8e7610077f595d0b9f6a5927a25ba92bc0fd0e66ac3c3b6a25e09599c80938a4df239f43d4222a4f08594187904e6bc')

+ 

+ package() {

+   install -Dm755 "$srcdir"/php-fpm.initd "$pkgdir"/etc/init.d/php-fpm

+ }

@@ -0,0 +1,93 @@ 

+ #!/usr/bin/openrc-run

+ 

+ # If you want to run separate master process per pool, then create a symlink

+ # to this runscript for each pool. In that mode, the php-fpm daemon is started

+ # as nobody by default. You can override the user (and group) by declaring

+ # variable "user" and optionally "group" in conf.d file, or in the $fpm_config

+ # file (the former has precedence).

+ 

+ : ${name:="PHP FastCGI Process Manager"}

+ 

+ command="/usr/bin/php-fpm"

+ command_background="yes"

+ start_stop_daemon_args="--quiet"

+ pidfile="/run/$RC_SVCNAME/php-fpm.pid"

+ retry="SIGTERM/20"

+ 

+ # configtest is here only for backward compatibility

+ extra_commands="checkconfig configtest"

+ extra_started_commands="reload reopen"

+ description_checkconfig="Run php-fpm config check"

+ description_reload="Gracefully reload workers and config"

+ description_reopen="Reopen log files"

+ 

+ required_files="$fpm_config"

+ 

+ depend() {

+ 	need net

+ 	use apache2 lighttpd nginx

+ }

+ 

+ init_vars() {

+ 	# Defaults for single master process with multiple pools

+ 	if [ "$RC_SVCNAME" = "php-fpm" ]; then

+ 		: ${fpm_config:="/etc/php/php-fpm.conf"}

+ 		: ${user:="root"}

+ 	# Defaults for master process per pool

+ 	else

+ 		: ${fpm_config="/etc/php/php-fpm.d/${RC_SVCNAME#php-fpm.}.conf"}

+ 		: ${user:="$(conf_get user)"}

+ 		: ${user:="nobody"}

+ 		: ${group:="$(conf_get group)"}

+ 	fi

+ 	command_args="--nodaemonize --fpm-config $fpm_config"

+ 	start_stop_daemon_args="$start_stop_daemon_args

+ 		--user $user ${group:+"--group $group"}"

+ }

+ 

+ start_pre() {

+ 	checkconfig || return 1

+ 

+ 	# If unix socket is used (instead of TCP/IP), then ensure that the

+ 	# directory exists and has correct privileges.

+ 	local listen="$(conf_get listen)"

+ 	if [ "${listen:0:1}" = "/" ]; then

+ 		checkpath -d -o $user:$group "$(dirname "$listen")"

+ 	fi

+ 

+ 	checkpath -d "$(dirname "$pidfile")"

+ }

+ 

+ reload() {

+ 	ebegin "Reloading $name"

+ 	start-stop-daemon --signal USR2 --pidfile "$pidfile"

+ 	eend $?

+ }

+ 

+ reopen() {

+ 	ebegin "Reopening $name log files"

+ 	start-stop-daemon --signal USR1 --pidfile "$pidfile"

+ 	eend $?

+ }

+ 

+ checkconfig() {

+ 	init_vars

+ 	ebegin "Checking $fpm_config"

+ 

+ 	local out

+ 	out="$(su -s /bin/sh -c "$command --test --fpm-config $fpm_config" $user 2>&1)" || {

+ 		printf "%s\n" "$out"

+ 		eend 1 "failed, please correct errors above"

+ 		return 1

+ 	}

+ }

+ 

+ configtest() {

+ 	ewarn "configtest is deprecated, use checkconfig instead"

+ 	checkconfig

+ }

+ 

+ conf_get() {

+ 	local key="$1"

+ 	sed -nE "s/^${key}\s*=\s*\"?([^\";]+).*/\1/p" "$fpm_config" | head -n 1

+ }

file modified
+40 -33
@@ -1,64 +1,71 @@ 

  # Maintainer: David P. <megver83@parabola.nu>

- # Maintainer (Arch): Jan de Groot <jgc@archlinux.org>

+ # Maintainer (arch): Jan Alexander Steffens (heftig) <heftig@archlinux.org>

+ # Contributor: Jan de Groot <jgc@archlinux.org>

  

  pkgname=polkit

- pkgver=0.118

- pkgrel=1

+ pkgver=0.120

+ pkgrel=3

  pkgrel+=.nonsystemd1

  pkgdesc="Application development toolkit for controlling system-wide privileges"

- arch=(x86_64 i686 armv7h)

+ arch=(x86_64)

+ arch+=(i686 armv7h)

  license=(LGPL)

  url="https://www.freedesktop.org/wiki/Software/polkit/"

- depends=(glib2 pam expat elogind js78)

- makedepends=(intltool gtk-doc gobject-introspection git autoconf-archive)

+ depends=(glib2 pam expat systemd js78)

+ depends=( ${depends[*]/systemd/elogind})

+ makedepends=(meson gtk-doc gobject-introspection git)

+ checkdepends=(python-dbusmock)

  backup=(etc/pam.d/polkit-1)

  provides=(polkit-elogind)

  replaces=(polkit-elogind polkit-consolekit)

- _commit=ff4c2144f0fb1325275887d9e254117fcd8a1b52 # git tag 0.118

- source=("git+https://gitlab.freedesktop.org/polkit/polkit.git#commit=$_commit"

-         '99-parabola.rules'

-         'elogind-configure-fix.patch')

- sha256sums=('SKIP'

-             'd28d6ecaf7682860e2b3768bb266bd94313546b7cd0ef3c2eace7b1576c47adb'

-             'd90b2a95aa3e9e1ebf9369c038c144e04900e095c5405bc4ba4901c31bf3f59b')

+ _commit=92b910ce2273daf6a76038f6bd764fa6958d4e8e  # tags/0.120

+ source=("git+https://gitlab.freedesktop.org/polkit/polkit.git#commit=$_commit")

+ source+=('99-parabola.rules'

+          'elogind-configure-fix.patch'

+          'meson-0.61.diff')

+ sha256sums=('SKIP')

+ sha256sums=('d28d6ecaf7682860e2b3768bb266bd94313546b7cd0ef3c2eace7b1576c47adb'

+             'd90b2a95aa3e9e1ebf9369c038c144e04900e095c5405bc4ba4901c31bf3f59b'

+             '45d08bbb76e1e22ca8e698df04652b7aceaded34f9b76ce6b68152fb26b0de8d')

  

  pkgver() {

-   cd $pkgname

+   cd polkit

    git describe --tags | sed 's/-/+/g'

  }

  

  prepare() {

-   cd $pkgname

+   cd polkit

    patch -Np 1 -i ${srcdir}/elogind-configure-fix.patch

-   NOCONFIGURE=1 ./autogen.sh

- }

- 

- build() {

-   cd $pkgname

  

-   ./configure --prefix=/usr --sysconfdir=/etc \

-       --localstatedir=/var --libexecdir=/usr/lib \

-       --enable-libsystemd-login=no --disable-static \

-       --enable-libelogind=yes --with-systemdsystemunitdir=no \

-       --enable-gtk-doc --with-os-type=redhat

+   # CVE-2021-4034

+   git cherry-pick -n a2bf5c9c83b6ae46cbd5c779d3055bff81ded683

  

-   sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

+   # Fix build with Meson 0.61.0

+   git apply -3 ../meson-0.61.diff

+ }

  

-   make

+ build() {

+   arch-meson polkit build \

+     --prefix=/usr \

+     -D session_tracking=libelogind \

+     -D systemdsystemunitdir=no \

+     -D os_type=redhat \

+     -D examples=true \

+     -D tests=true \

+     -D gtk_doc=true \

+     -D man=true

+   meson compile -C build

  }

  

  check() {

-   cd $pkgname

-   make -k check || :

+   meson test -C build --print-errorlogs -t 3

  }

  

  package() {

-   cd $pkgname

-   make DESTDIR="$pkgdir" install \

-       dbusconfdir=/usr/share/dbus-1/system.d \

-       rulesdir=/usr/share/polkit-1/rules.d

+   meson install -C build --destdir "$pkgdir"

  

    install -d -o root -g 102 -m 750 "$pkgdir"/{etc,usr/share}/polkit-1/rules.d

+   mv "$pkgdir"/{etc,usr/share}/polkit-1/rules.d/50-default.rules

  

    install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" <<END

  u polkitd 102 "PolicyKit daemon"

@@ -0,0 +1,24 @@ 

+ diff --git i/actions/meson.build w/actions/meson.build

+ index 2abaaf3..1e3f370 100644

+ --- i/actions/meson.build

+ +++ w/actions/meson.build

+ @@ -1,7 +1,6 @@

+  policy = 'org.freedesktop.policykit.policy'

+  

+  i18n.merge_file(

+ -  policy,

+    input: policy + '.in',

+    output: '@BASENAME@',

+    po_dir: po_dir,

+ diff --git i/src/examples/meson.build w/src/examples/meson.build

+ index c6305ab..8c18de5 100644

+ --- i/src/examples/meson.build

+ +++ w/src/examples/meson.build

+ @@ -1,7 +1,6 @@

+  policy = 'org.freedesktop.policykit.examples.pkexec.policy'

+  

+  i18n.merge_file(

+ -  policy,

+    input: policy + '.in',

+    output: '@BASENAME@',

+    po_dir: po_dir,

@@ -0,0 +1,20 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=postfix-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC postfix init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'postfix')

+ optdepends=('bind-openrc: bind initscript'

+             'cyrus-sasl-openrc: cyrus-sasl initscript')

+ conflicts=('systemd-sysvcompat')

+ source=("postfix.initd")

+ sha512sums=('f4d880ece3786951795c906295b453a7c5c6c41be69776463d043de9a4d438d79527cd6baf9ad8861ed407c54cc1b8935b10e6f3a432c873ee0fe8f5a13612ef')

+ 

+ package() {

+   install -Dm755 "$srcdir"/postfix.initd "$pkgdir"/etc/init.d/postfix

+ }

@@ -0,0 +1,85 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2012 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_started_commands="reload abort flush"

+ 

+ description_reload="Re-read configuration files. Running processes terminate at their earliest convenience."

+ description_abort="Stop the Postfix mail system abruptly. Running processes are signaled to stop immediately."

+ description_flush="Force delivery: attempt to deliver every message in the deferred mail queue."

+ 

+ # Please read http://www.postfix.org/MULTI_INSTANCE_README.html for multi instance support

+ CONF_DIR="/etc/postfix"

+ CONF_OPT="${SVCNAME##*.}"

+ if [ -n ${CONF_OPT} -a ${SVCNAME} != "postfix" ]; then

+ 	CONF_DIR="${CONF_DIR}.${CONF_OPT}"

+ fi

+ if [ "${CONF_DIR}" = "/etc/postfix" ]; then

+ 	CONF_PARAM=""

+ 	CONF_MESSAGE=""

+ else

+ 	CONF_PARAM="-c ${CONF_DIR}"

+ 	CONF_MESSAGE="(${CONF_DIR})"

+ fi

+ 

+ depend() {

+ 	use logger dns ypbind amavisd antivirus postfix_greylist net saslauthd

+ 	if [ "${SVCNAME}" = "postfix" ]; then

+ 		provide mta

+ 	fi

+ }

+ 

+ start() {

+ 	if [ ! -z "${CONF_PARAM}" ]; then

+ 		einfo "Please consider updating your config for postmulti support."

+ 	fi

+ 	ebegin "Starting postfix ${CONF_MESSAGE}"

+ 	if [ ! -d ${CONF_DIR} ]; then

+ 		eend 1 "${CONF_DIR} does not exist"

+ 		return 1

+ 	fi

+ 	/usr/bin/postfix ${CONF_PARAM} start >/dev/null 2>&1

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping postfix ${CONF_MESSAGE}"

+ 	/usr/bin/postfix ${CONF_PARAM} stop >/dev/null 2>&1

+ 	eend

+ }

+ 

+ status() {

+ 	local _retval

+ 	einfon ""

+ 	/usr/bin/postfix ${CONF_PARAM} status

+ 	_retval=$?

+ 	if [ x${_retval} = 'x0' ]; then

+ 		mark_service_started "${SVCNAME}"

+ 		eend 0

+ 	else

+ 		mark_service_stopped "${SVCNAME}"

+ 		eend 3

+ 	fi

+ }

+ 

+ reload() {

+ 	ebegin "Reloading postfix ${CONF_MESSAGE}"

+ 	/usr/bin/postfix ${CONF_PARAM} reload >/dev/null 2>&1

+ 	eend $?

+ }

+ 

+ abort() {

+ 	ebegin "Aborting postfix ${CONF_MESSAGE}"

+ 

+ 	if service_started "${SVCNAME}"; then

+ 		mark_service_stopped "${SVCNAME}"

+ 	fi

+ 	/usr/bin/postfix ${CONF_PARAM} abort >/dev/null 2>&1

+ 	eend $?

+ }

+ 

+ flush() {

+ 	ebegin "Flushing postfix ${CONF_MESSAGE}"

+ 	/usr/bin/postfix ${CONF_PARAM} flush >/dev/null 2>&1

+ 	eend $?

+ }

@@ -0,0 +1,21 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=postgresql-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC postgresql init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'postgresql')

+ conflicts=('systemd-sysvcompat')

+ source=("postgresql".{confd,initd})

+ install=postgresql.install

+ sha512sums=('f0913802e2a1d27844ccc130cb9e0ef6acabb79e36b8571f831dd3bf7bd10ba5222b6fad4d16aaea094286a7d4d8c916766c074411c04422b45f832a277d0c84'

+             '4c8797e5f8f5c67509466ccb10c5f2a51a96c716d0c47d5f81239ec91403041d917a2f1a7fa3435596b845862cac5b4d785177487d8a2c51450e635da58a9abc')

+ 

+ package() {

+   install -Dm755 "$srcdir"/postgresql.initd "$pkgdir"/etc/init.d/postgresql

+   install -Dm644 "$srcdir"/postgresql.confd "$pkgdir"/etc/conf.d/postgresql

+ }

@@ -0,0 +1,65 @@ 

+ # Comma-separated list of directories that contain a unix

+ # socket. Created and controlled by the related initscript. The

+ # directories created will be owned root:postgres with mode 1775.

+ #

+ # /run/postgresql is the default directory.

+ PG_SOCKET_DIRECTORIES="/run/postgresql"

+ 

+ # Which port and socket to bind PostgreSQL

+ PGPORT="5432"

+ 

+ # How long to wait for server to start in seconds

+ START_TIMEOUT=10

+ 

+ # NICE_QUIT ignores new connections and wait for clients to disconnect from

+ # server before shutting down. NICE_TIMEOUT in seconds determines how long to

+ # wait for this to succeed.

+ NICE_TIMEOUT=60

+ 

+ # Forecfully disconnect clients from server and shut down. This is performed

+ # after NICE_QUIT. Terminated client connections have their open transactions

+ # rolled back.

+ # Set RUDE_QUIT to "NO" to disable. RUDE_TIMEOUT in seconds.

+ RUDE_QUIT="YES"

+ RUDE_TIMEOUT=30

+ 

+ # If the server still fails to shutdown, you can force it to quit by setting

+ # this to YES and a recover-run will execute on the next startup.

+ # Set FORCE_QUIT to "YES" to enable. FORCE_TIMEOUT in seconds.

+ FORCE_QUIT="NO"

+ FORCE_TIMEOUT=2

+ 

+ # Extra options to run postmaster with, e.g.:

+ # -N is the maximal number of client connections

+ # -B is the number of shared buffers and has to be at least 2x the value for -N

+ # Please read the man-page to postmaster for more options. Many of these

+ # options can be set directly in the configuration file.

+ #PGOPTS="-N 512 -B 1024"

+ 

+ # Pass extra environment variables. If you have to export environment variables

+ # for the database process, this can be done here.

+ # Don't forget to escape quotes.

+ #PG_EXTRA_ENV="PGPASSFILE=\"/path/to/.pgpass\""

+ 

+ ##############################################################################

+ #

+ # The following values should not be arbitrarily changed.

+ #

+ # uses these values to

+ # determine where to create the data directory, where to place the

+ # configuration files, and any additional options to pass to initdb.

+ #

+ # The initscript also uses these variables to inform PostgreSQL where to find

+ # its data directory and configuration files.

+ #

+ ##############################################################################

+ 

+ # Location of configuration files

+ PGDATA="/var/lib/postgres/data/"

+ 

+ # Where the data directory is located/to be created

+ DATA_DIR="/var/lib/postgres/data"

+ 

+ # Additional options to pass to initdb.

+ # See `man initdb' for available options.

+ PG_INITDB_OPTS="--encoding=UTF8"

@@ -0,0 +1,155 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2017 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ extra_started_commands="reload promote"

+ 

+ PG_CTL="/usr/bin/pg_ctl"

+ 

+ description="PostgreSQL -- the world's most advanced open source database --

+ ${RC_SERVICE} is a wrapper around pg_ctl with additional administrative checks

+ and convenience"

+ 

+ get_config() {

+     [ -f "${PGDATA%/}/postgresql.conf" ] || return 1

+ 

+     eval echo $(sed -e 's:#.*::' "${PGDATA%/}/postgresql.conf" \

+         | awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }')

+ }

+ 

+ depend() {

+     use net

+     provide postgresql

+ 

+     if [ "$(get_config log_destination)" = "syslog" ]; then

+         use logger

+     fi

+ }

+ 

+ configured_port=$(get_config port)

+ : ${configured_port:=${PGPORT}}

+ 

+ checkconfig() {

+     # Check that DATA_DIR has been set

+     if [ -z "${DATA_DIR}" ] ; then

+         eerror "DATA_DIR not set"

+         eerror "HINT: Perhaps you need to update /etc/conf.d/postgresql"

+         return 1

+     fi

+ 

+     # Check that DATA_DIR exists

+     if [ ! -d "${DATA_DIR}" ] ; then

+         eerror "Directory not found: ${DATA_DIR}"

+         eerror "HINT: Ensure that DATA_DIR points to the right path."

+         return 1

+     fi

+ 

+     # Check for the existence of PostgreSQL's config files, and set the

+     # proper mode and ownership.

+     # Only three files should be checked as potentially other files

+     # may be in PGDATA that should not be touched.

+     local file

+     for file in postgresql pg_hba pg_ident ; do

+         file="${PGDATA%/}/${file}.conf"

+         if [ -f "${file}" ] ; then

+             checkpath -f -m 0600 -o postgres:postgres "${file}"

+         else

+             eerror "${file} not found"

+             eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}"

+             return 1

+         fi

+     done

+ 

+     # Set the proper permission for the socket paths and create it if

+     # it doesn't exist.

+     set -f; IFS=','

+     local s

+     for s in ${PG_SOCKET_DIRECTORIES}; do

+         checkpath -d -m 1775 -o root:postgres "${s}"

+         if [ -e "${s%/}/.s.PGSQL.${configured_port}" ] ; then

+             eerror "Socket conflict."

+             eerror "A server is already listening on:"

+             eerror "    ${s%/}/.s.PGSQL.${configured_port}"

+             eerror "HINT: Change PGPORT to listen on a different socket."

+             return 1

+         fi

+     done

+     set +f; unset IFS

+ }

+ 

+ start() {

+     checkconfig || return 1

+ 

+     ebegin "Starting PostgreSQL"

+ 

+     rm -f "${DATA_DIR%/}/postmaster.pid"

+ 

+     su - postgres -c \

+        "PGPORT=${configured_port} ${PG_EXTRA_ENV} ${PG_CTL} start \

+            -s -w -t ${START_TIMEOUT} -l ${DATA_DIR%/}/postmaster.log \

+            -D ${PGDATA} \

+            -o '--data-directory=${DATA_DIR} \

+                --unix-socket-directories=${PG_SOCKET_DIRECTORIES} \

+                ${PGOPTS}'"

+ 

+     local retval=$?

+ 

+     if [ $retval -ne 0 ] ; then

+         eerror "Check the log for a possible explanation of the above error."

+         eerror "The log may be located at:"

+         eerror "    ${DATA_DIR%/}/postmaster.log"

+         eerror "Or wherever you configured PostgreSQL to log."

+     fi

+ 

+     eend $retval

+ }

+ 

+ stop() {

+     local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} ))

+     ebegin "Stopping PostgreSQL (this can take up to ${seconds} seconds)"

+ 

+     su - postgres -c \

+        "${PG_CTL} stop -t ${NICE_TIMEOUT} -s -D ${DATA_DIR} -m smart"

+     local retval=$?

+ 

+     if [ "${RUDE_QUIT}" != "NO" -a ${retval} -ne 0 ] ; then

+         einfo "Previous attempt failed. Trying RUDE_QUIT."

+         su - postgres -c \

+            "${PG_CTL} stop -t ${RUDE_TIMEOUT} -s -D ${DATA_DIR} -m fast"

+         retval=$?

+     fi

+ 

+     if [ "${FORCE_QUIT}" = "YES" -a ${retval} -ne 0 ] ; then

+         einfo "Previous step failed. Trying FORCE_QUIT."

+         ewarn "A recover-run might be executed on next startup."

+         su - postgres -c \

+            "${PG_CTL} stop -t ${FORCE_TIMEOUT} -s -D ${DATA_DIR} -m immediate"

+         retval=$?

+     fi

+ 

+     eend ${retval}

+ }

+ 

+ status() {

+     ebegin "Checking PostgreSQL status"

+     su - postgres -c "${PG_CTL} status -D ${DATA_DIR}"

+     eend $?

+ }

+ 

+ description_reload="Simply sends the postgres process a SIGHUP signal, causing

+            it to reread its configuration files (postgresql.conf, pg_hba.conf,

+            etc.). This allows changing of configuration-file options that do not

+            require a complete restart to take effect."

+ reload() {

+     ebegin "Reloading PostgreSQL configuration"

+     su - postgres -c "${PG_CTL} reload -s -D ${DATA_DIR}"

+     eend $?

+ }

+ 

+ description_promote="If the server is in standby, it is commanded to exit

+             recovery and begin read-write operations."

+ promote() {

+     ebegin "Promoting PostgreSQL @SLOT@"

+     su - postgres -c "${PG_CTL} promote -s -D ${DATA_DIR}"

+     eend $?

+ }

@@ -0,0 +1,5 @@ 

+ post_install() {

+ 	local datadir="/var/lib/postgres/data"

+ 	echo "	==> requires datadir $datadir"

+ 	echo "	==> run as user postgres: 'initdb -D $datadir'"

+ }

@@ -0,0 +1,21 @@ 

+ # Maintainer: Nathan Owens <ndowens@artixlinux.org>

+ # Contributor: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=privoxy-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC privoxy init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'privoxy')

+ conflicts=('systemd-sysvcompat')

+ source=("privoxy.initd")

+ sha512sums=('e32c5f674360da66d704ea63b74eaf26afab8524707e1e5ad5858bef823a70af196210003f398a879db8492079c5cba4db3ba44f6695825b1367cce1213bd4d5')

+ 

+ package() {

+   install -Dm755 "$srcdir/privoxy.initd" "$pkgdir/etc/init.d/privoxy"

+ }

@@ -0,0 +1,13 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright by Artix Linux team under GPLv2

+ 

+ supervisor=supervise-daemon

+ command=/usr/bin/privoxy

+ command_args="--no-daemon /etc/privoxy/config"

+ command_user="privoxy:privoxy"

+ required_files="/etc/privoxy/config"

+ 

+ depend() {

+ 	use net

+ }

+ 

@@ -0,0 +1,22 @@ 

+ 

+ pkgname=quota-tools-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC quota-tools init script"

+ arch=('any')

+ license=('GPL2')

+ depends=('openrc' 'quota-tools' 'rpcbind-openrc')

+ conflicts=('systemd-sysvcompat')

+ source=(quota.initd

+         quota.confd

+ 	rpc.rquotad.initd)

+ sha512sums=('1b2f957b38b191714ab064321a1bea584ea8694c3057eb89140af1913221693c7b423cf746237d943460e2557502da705b2ad1dce71ddb88fdae043a7a492c95'

+             '3253b69932332eff2944753f687d780d651dc2b21b524b7055164b91292c13c346cd46443bd58267b239f72fd8918a7e113eec62871573ee94e33df5eb3c82f8'

+             '42d46f0356a93682f22f1072e2e61c2378155fe87d0bb386860e11d80bb10294a2262360c704687a115d6a8f78d87d5e37d83c9e4c75f14909308c28c5ada42d')

+ 

+ package() {

+   install -Dm755 "$srcdir"/quota.initd "$pkgdir"/etc/init.d/quota

+   install -Dm644 "$srcdir"/quota.confd "$pkgdir"/etc/conf.d/quota

+   install -Dm755 "$srcdir"/rpc.rquotad.initd "$pkgdir"/etc/init.d/rpc.rquotad

+ }

@@ -0,0 +1,20 @@ 

+ # /etc/conf.d/quota: config file for /etc/init.d/quota

+ 

+ # Note: if your console is hooked up to a serial terminal,

+ # you prob want to drop the '-v' from the OPTS vars below.

+ 

+ 

+ # Run quotacheck ?

+ RUN_QUOTACHECK="yes"

+ 

+ 

+ # Options for quotacheck

+ QUOTACHECK_OPTS="-avug"

+ 

+ 

+ # Options for quotaon

+ QUOTAON_OPTS="-avug"

+ 

+ 

+ # Options for quotaoff

+ QUOTAOFF_OPTS="-avug"

@@ -0,0 +1,37 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2012 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License, v2

+ 

+ extra_started_commands="check"

+ description_check="Running quotacheck with quota being offline"

+ 

+ depend() {

+ 	need localmount

+ 	use portmap

+ }

+ 

+ start() {

+ 	if [ "${RUN_QUOTACHECK}" = "yes" ] ; then

+ 		ebegin "Checking quotas (may take a while)"

+ 		quotacheck ${QUOTACHECK_OPTS}

+ 		eend $?

+ 	fi

+ 

+ 	ebegin "Starting quota"

+ 	quotaon ${QUOTAON_OPTS}

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping quota"

+ 	quotaoff ${QUOTAOFF_OPTS}

+ 	eend $?

+ }

+ 

+ check() {

+ 	ebegin "Checking quota"

+ 	quotaoff ${QUOTAOFF_OPTS} && \

+ 	quotacheck ${QUOTACHECK_OPTS} && \

+ 	quotaon ${QUOTAON_OPTS}

+ 	eend $?

+ }

@@ -0,0 +1,25 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2007 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ [ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs

+ 

+ rpc_bin=/usr/bin/rpc.rquotad

+ 

+ depend() {

+ 	use ypbind net

+ 	need portmap

+ 	after quota

+ }

+ 

+ start() {

+ 	ebegin "Starting rpc.rquotad"

+ 	${rpc_bin} ${OPTS_RPC_RQUOTAD}

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping rpc.rquotad"

+ 	start-stop-daemon --stop --quiet --exec ${rpc_bin}

+ 	eend $?

+ }

@@ -0,0 +1,18 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=rpcbind-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC rpcbind init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'rpcbind')

+ conflicts=('systemd-sysvcompat')

+ source=("rpcbind.initd")

+ sha512sums=('81caee919737e21a336d5fefb25a95d42af2ea7bffd2fb542819f95314875f47058b98af6babdd64ba70078b96daef1e0eb7a4d677df5469f3cc014236148dcc')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/rpcbind.initd "${pkgdir}"/etc/init.d/rpcbind

+ }

@@ -0,0 +1,21 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2007 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ depend() {

+ 	use net

+ 	before inetd xinetd

+ 	provide portmap

+ }

+ 

+ start() {

+ 	ebegin "Starting rpcbind"

+ 	start-stop-daemon --start --quiet --exec /usr/bin/rpcbind -- ${RPCBIND_OPTIONS}

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping rpcbind"

+ 	start-stop-daemon --stop --quiet --exec /usr/bin/rpcbind

+ 	eend $?

+ }

@@ -0,0 +1,21 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=rsync-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC rsync init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'rsync')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/rsyncd')

+ source=("rsyncd".{confd,initd})

+ sha512sums=('8ea9a2f1fea508fa132313fa16513eac84a9ed3ce75741c42769b56bbcd3f1bd2eb8bfdfe40a6c7f619e4281e8fc8d95d1bd84096d0b64aaacf606cd614ae5b3'

+             'a629e86ca4978134b9080ab4bd4ddc322a27cfd50df2364bb90f3065a024e5151bbda2bf7745f9c1913516c6c92b183b6147df4807aaceddb200c98e6141f85e')

+ 

+ package() {

+   install -Dm755 "$srcdir"/rsyncd.initd "$pkgdir"/etc/init.d/rsyncd

+   install -Dm644 "$srcdir"/rsyncd.confd "$pkgdir"/etc/conf.d/rsyncd

+ }

@@ -0,0 +1,5 @@ 

+ # /etc/conf.d/rsyncd: config file for /etc/init.d/rsyncd

+ 

+ # see man pages for rsync or run `rsync --help`

+ # for valid cmdline options

+ #RSYNC_OPTS=""

@@ -0,0 +1,13 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2012 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ supervisor="supervise-daemon"

+ command="/usr/bin/rsync"

+ command_args="${RSYNCD_OPTS}"

+ command_args_foreground="--daemon --no-detach"

+ command_args_background="-p ${pidfile}"

+ 

+ depend() {

+     use net

+ }

@@ -0,0 +1,21 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=samba-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC samba init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'samba')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/smb')

+ source=("smb".{confd,initd})

+ sha512sums=('d4a747577b07c78bbb4c9a85009ef067f73a17b3b62572ece6214091ddf4b5f63d862f52c783ad19aa52e6a71ddcaa3aaf692c1c158ac162b1fa4b5e3567f8ba'

+             '431435a4e16c7ddd5c45825739c799a8fb77e4e02f453a93a2e84a588498745365ff2f2f26426e83e51a7510e2eda5c7260b4aeed63906a0641189010e1f705c')

+ 

+ package() {

+   install -Dm755 "$srcdir"/smb.initd "$pkgdir"/etc/init.d/smb

+   install -Dm644 "$srcdir"/smb.confd "$pkgdir"/etc/conf.d/smb

+ }

@@ -0,0 +1,45 @@ 

+ # Add "winbind" to the daemon_list if you also want winbind to start.

+ # Replace "smbd nmbd" by "samba4" if you want the active directory domain controller part or the ntvfs

+ # file server part or the rpc proxy to start.

+ # Note that samba4 controls 'smbd' by itself, thus it can't be started manually. You can, however,

+ # tweak the behaviour of a samba4-controlled smbd by modifying your '/etc/samba/smb.conf' file

+ # accordingly.

+ daemon_list="smbd nmbd"

+ 

+ piddir="/run/samba"

+ 

+ #----------------------------------------------------------------------------

+ # Daemons calls: <daemon_name>_<command_option>

+ #----------------------------------------------------------------------------

+ my_service_name="smb"

+ my_service_PRE="unset TMP TMPDIR"

+ my_service_POST=""

+ 

+ #----------------------------------------------------------------------------

+ # Daemons calls: <daemon_name>_<command_option>

+ #----------------------------------------------------------------------------

+ smbd_start_options="-D"

+ smbd_command="/usr/bin/smbd"

+ smbd_start="start-stop-daemon --start --exec ${smbd_command} -- ${smbd_start_options}"

+ smbd_stop="start-stop-daemon --stop --exec ${smbd_command}"

+ smbd_reload="killall -HUP smbd"

+ 

+ nmbd_start_options="-D"

+ nmbd_command="/usr/bin/nmbd"

+ nmbd_start="start-stop-daemon --start --exec ${nmbd_command} -- ${nmbd_start_options}"

+ nmbd_stop="start-stop-daemon --stop --exec ${nmbd_command}"

+ nmbd_reload="killall -HUP nmbd"

+ 

+ samba4_start_options=""

+ samba4_command="/usr/bin/samba"

+ samba4_pidfile="${piddir}/samba.pid"

+ samba4_start="start-stop-daemon --start --exec ${samba4_command} --pidfile ${samba4_pidfile} -- ${samba4_start_options}"

+ samba4_stop="start-stop-daemon --stop --exec ${samba4_command} --pidfile ${samba4_pidfile}"

+ samba4_reload="killall -HUP samba"

+ 

+ winbind_start_options=""

+ winbind_command="/usr/bin/winbindd"

+ winbind_start="start-stop-daemon --start --exec ${winbind_command} -- ${winbind_start_options}"

+ winbind_stop="start-stop-daemon --stop --exec ${winbind_command}"

+ winbind_reload="killall -HUP winbindd"

+ 

@@ -0,0 +1,55 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2018 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License, v2 or later

+ 

+ extra_started_commands="reload"

+ [ -z "${piddir}" ] && piddir="/run/samba"

+ 

+ depend() {

+ 	after slapd

+ 	need net

+ 	use cupsd

+ }

+ 

+ DAEMONNAME="${SVCNAME##smb.}"

+ [ "${DAEMONNAME}" != "smb" ] && daemon_list=${DAEMONNAME}

+ 

+ signal_do() {

+ 	local signal="$1"

+ 	[ -z "${signal}" ] && return 0

+ 

+ 	local result=0 last_result=0 daemon= cmd_exec=

+ 	for daemon in ${daemon_list} ; do

+ 		eval cmd_exec=\$${daemon}_${signal}

+ 		if [ -n "${cmd_exec}" ]; then

+ 			ebegin "${my_service_name} -> ${signal}: ${daemon}"

+ 			#echo ${cmd} '->' ${!cmd}

+ 			${cmd_exec} > /dev/null

+ 			last_result=$?

+ 			eend ${last_result}

+ 		fi

+ 		result=$(( ${result} + ${last_result} ))

+ 	done

+ 	return ${result}

+ }

+ 

+ start() {

+ 	${my_service_PRE}

+ 	[ -d "${piddir}" ] || mkdir -p "${piddir}"

+ 	signal_do start && return 0

+ 

+ 	eerror "Error: starting services (see system logs)"

+ 	signal_do stop

+ 	return 1

+ }

+ stop() {

+ 	${my_service_PRE}

+ 	if signal_do stop ; then

+ 		${my_service_POST}

+ 		return 0

+ 	fi

+ }

+ reload() {

+ 	${my_service_PRE}

+ 	signal_do reload

+ }

@@ -0,0 +1,21 @@ 

+ # Maintainer: nous@artixlinux.org

+ 

+ pkgname=spamassassin-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC spamassassin init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'spamassassin')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/spamassassin')

+ source=("spamassassin".{confd,initd})

+ sha512sums=('b2233d9330fa06d13dc8d222fa16198a1f81dcb9c87ca93961db54d9f2514cdabd824d0f25c0cca678495f271f48f601ee14363c2a2f833100facae307226beb'

+             '365a26ef58347e35479a2060aff3a011149327cd8477e8b39748f707175795cbc1f8afa93ed59866e9e799a06ec6b3e3e2c4f39dc62e786d41f6d98a3974ab16')

+ 

+ package() {

+   install -Dm755 "$srcdir"/spamassassin.initd "$pkgdir"/etc/init.d/spamassassin

+   install -Dm644 "$srcdir"/spamassassin.confd "$pkgdir"/etc/conf.d/spamassassin

+ }

@@ -0,0 +1,30 @@ 

+ # ***WARNING***

+ #

+ # The spamd daemon must not run on an untrusted network.

+ #

+ # ***WARNING***

+ 

+ # Additional options to pass to the spamd daemon. The spamd(1) man

+ # page explains the available options. If you choose to listen on a

+ # non-default interface, you will need to use OpenRC's "rc_need"

+ # mechanism to ensure that your interface comes up before spamd

+ # starts. The openrc-run(8) man page describes rc_need.

+ SPAMD_OPTS="--max-children=5 --create-prefs --helper-home-dir"

+ 

+ # Sets the 'nice' level of the spamd process.

+ SPAMD_NICELEVEL=0

+ 

+ # How long (in seconds) should we wait for spamd to stop after we've

+ # asked it to? After this amount of time, if spamd is still running,

+ # we will assume that it has failed to stop.

+ SPAMD_TIMEOUT=15

+ 

+ # Do you want to run spamd as root? If you have local users storing their

+ # personal configurations (or bayes databases) in ~/.spamassassin, then you

+ # may want to run spamd as root so that it can setuid to each user while

+ # processing his spam. (That way, you don't have to grant the "spamd" user

+ # individual permissions to everyone's ~/.spamassassin directory.)

+ #

+ # On the other hand, if you don't store any per-user configuration on

+ # the filesystem, then you should leave this alone.

+ SPAMD_RUN_AS_ROOT=false

@@ -0,0 +1,38 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2017 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ : ${SPAMD_TIMEOUT:=15}

+ : ${SPAMD_NICELEVEL:=0}

+ 

+ supervisor=supervise-daemon

+ command="/usr/bin/vendor_perl/spamd"

+ pidfile="/run/spamd.pid"

+ command_args="${SPAMD_OPTS}"

+ supervise_daemon_args="--nicelevel ${SPAMD_NICELEVEL}"

+ 

+ # Retry after SPAMD_TIMEOUT seconds because spamd can take a

+ # while to kill off all of its children. This was bug 322025.

+ retry="${SPAMD_TIMEOUT}"

+ 

+ if ! [ "${SPAMD_RUN_AS_ROOT}" = "true" ]; then

+     # Passing --username=root to spamd kills it, so if SPAMD_RUN_AS_ROOT

+     # is true, then we want to pass no user/group command args at all.

+     # Any value other than "true" gets the default user/group of "spamd".

+     command_args="${command_args} --username=spamd --groupname=spamd"

+ fi

+ 

+ extra_started_commands="reload"

+ 

+ depend() {

+     before mta

+     use logger mysql postgresql

+ }

+ 

+ reload() {

+ 	ebegin "Reloading configuration"

+ 	# Warning: reload causes the PID of the spamd process to

+ 	# change, but spamd does update its PID file afterwards.

+ 	supervise-daemon spamassassin --signal HUP

+ 	eend $?

+ }

@@ -0,0 +1,26 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ # Contributor: nous <nous@artixlinux.org>

+ 

+ pkgname=squid-openrc

+ pkgver=20220313

+ pkgrel=1

+ pkgdesc="OpenRC squid init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ groups=('openrc-galaxy')

+ depends=('openrc' 'squid')

+ provides=('init-squid')

+ conflicts=('init-squid')

+ backup=('etc/conf.d/squid')

+ source=("squid.confd"

+         "squid.initd")

+ sha256sums=('dd0b7ae99f8c409d4bfe3de21d84ce9c4adde8477e1e3ab5c114e7976666ed9c'

+             '1dc0a13300904a4eb478671cff54d75ae6fc0ff99cd3b6112a8da9b1391d14d6')

+ 

+ package() {

+   install -Dm755 "$srcdir/squid.initd" "$pkgdir/etc/init.d/squid"

+   install -Dm644 "$srcdir/squid.confd" "$pkgdir/etc/conf.d/squid"

+ }

@@ -0,0 +1,18 @@ 

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ # Config file for /etc/init.d/squid

+ 

+ SQUID_OPTS="-YC"

+ 

+ # Kerberos keytab file to use. This is required if you enable kerberos authentication.

+ SQUID_KEYTAB=""

+ 

+ # Use max_filedescriptors setting in squid.conf to determine the maximum number

+ # of filedescriptors squid can open.

+ 

+ # Set whether Squid should receive two shutdown signals instead of one. If set to "yes",

+ # Squid will skip the graceful shutdown step, and will try to immediately close all open

+ # file descriptors and helpers. This is useful if you experience very long delays when

+ # shutting down the caching proxy.

+ SQUID_FAST_SHUTDOWN="no"

@@ -0,0 +1,135 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ # supervised, nous 2022

+ 

+ SQUID_SVCNAME=$( echo "${RC_SVCNAME}" | tr -cd '[a-zA-Z0-9]' )

+ SQUID_CONF=/etc/squid/${RC_SVCNAME}.conf

+ SQUID_USER=proxy

+ SQUID_GROUP=proxy

+ 

+ supervisor=supervise-daemon

+ supervise_daemon_args="--respawn-delay 5 --respawn-max 10"

+ #pidfile="/run/${SQUID_SVCNAME}-supervise.pid"

+ command="/usr/bin/$SQUID_SVCNAME"

+ command_args="${SQUID_OPTS} -f $SQUID_CONF -N"

+ 

+ extra_started_commands="reload rotate"

+ 

+ depend() {

+ 	use dns net

+ }

+ 

+ checkconfig() {

+ 	local CONFFILES="$SQUID_CONF /etc/squid/${RC_SVCNAME}.include /etc/squid/${RC_SVCNAME}.include.*"

+ 	if [ ! -f $SQUID_CONF ]; then

+ 		eerror "You need to create $SQUID_CONF first."

+ 		eerror "The main configuration file and all included file names should have the following format:"

+ 		eerror "${CONFFILES}"

+ 		eerror "An example can be found in /etc/squid/squid.conf.default"

+ 		return 1

+ 	fi

+ 

+ 	local PIDFILE=$(cat ${CONFFILES} 2>/dev/null 3>/dev/null | awk '/^[ \t]*pid_filename[ \t]+/ { print $2 }')

+ 	[ -z ${PIDFILE} ] && PIDFILE=/run/squid.pid

+ 	if [ /run/${RC_SVCNAME}.pid != ${PIDFILE} ]; then

+ 		eerror "$SQUID_CONF must set pid_filename to"

+ 		eerror "   /run/${RC_SVCNAME}.pid"

+ 		eerror "CAUTION: http_port, cache_dir and *_log parameters must be different than"

+ 		eerror "         in any other instance of squid."

+ 		eerror "Make sure the main configuration file and all included file names have the following format:"

+ 		eerror "${CONFFILES}"

+ 		return 1

+ 	fi

+ 

+ 	# Maximum file descriptors squid can open is determined by:

+ 	# a basic default of N=1024

+ 	#  ... altered by ./configure --with-filedescriptors=N

+ 	#  ... overridden on production by squid.conf max_filedescriptors (if,

+ 	#  and only if, setrlimit() RLIMIT_NOFILE is able to be built+used).

+ 	# Since we do not configure hard coded # of filedescriptors anymore,

+ 	# there is no need for ulimit calls in the init script.

+ 	# Use max_filedescriptors in squid.conf instead.

+ 

+ 	local CACHE_SWAP=$(cat ${CONFFILES} 2>/dev/null 3>/dev/null | awk '/^[ \t]*cache_dir[ \t]+/ { if ( $2 == "rock" ) printf "%s/rock ", $3; else if ( $2 == "coss" ) printf "%s/stripe ", $3; else printf "%s/00 ", $3; }')

+ 	[ -z "$CACHE_SWAP" ] && CACHE_SWAP="/var/cache/squid/00"

+ 	

+ 	local x

+ 	for x in $CACHE_SWAP ; do

+ 		if [ ! -e $x ] ; then

+ 			ebegin "Initializing cache directory ${x%/*}"

+ 			local ORIG_UMASK=$(umask)

+ 			umask 027

+ 

+ 			if ! (mkdir -p ${x%/*} && chown $SQUID_USER:$SQUID_GROUP ${x%/*}) ; then

+ 				eend 1

+ 				return 1

+ 			fi

+ 

+ 			local INIT_CACHE_RESPONSE="$($command -z -N -f $SQUID_CONF 2>&1)"

+ 			if [ $? != 0 ] || echo "$INIT_CACHE_RESPONSE" | grep -q "erminated abnormally" ; then

+ 				umask $ORIG_UMASK

+ 				eend 1

+ 				echo "$INIT_CACHE_RESPONSE"

+ 				return 1

+ 			fi

+ 

+ 			umask $ORIG_UMASK

+ 			eend 0

+ 			break

+ 		fi

+ 	done

+ 	

+ 	return 0

+ }

+ 

+ start_pre() {

+ 	checkconfig || return 1

+ 	checkpath -d -q -m 0750 -o $SQUID_USER:$SQUID_GROUP /run/${RC_SVCNAME}

+ 

+ 	# see https://wiki.squid-cache.org/MultipleInstances

+ 	ebegin "Starting ${RC_SVCNAME} (service name ${SQUID_SVCNAME}) with KRB5_KTNAME=\"${SQUID_KEYTAB}\" $command ${SQUID_OPTS} -f $SQUID_CONF"

+ #	KRB5_KTNAME="${SQUID_KEYTAB}" $command ${SQUID_OPTS} -f $SQUID_CONF

+ #	eend $? && sleep 1

+ }

+ 

+ stop_pre() {

+ 	ebegin "Stopping ${RC_SVCNAME} with $command -k shutdown -f $SQUID_CONF $SQUID_OPTS"

+ 	$command -k shutdown -f $SQUID_CONF $SQUID_OPTS &

+ }

+ stop_post() {

+ 	# Now we have to wait until squid has _really_ stopped.

+ 	sleep 1

+ 	if [ -f /run/${RC_SVCNAME}.pid ] ; then

+ 		einfon "Waiting for squid to shutdown ."

+ 		cnt=0

+ 		while [ -f /run/${RC_SVCNAME}.pid ]; do

+ 			cnt=$(expr $cnt + 1)

+ 			if [ $cnt -gt 60 ] ; then

+ 				# Waited 120 seconds now. Fail.

+ 				echo

+ 				eend 1 "Failed."

+ 				break

+ 			fi

+ 			sleep 2

+ 			printf "."

+ 		done

+ 		echo

+ 	fi

+ 	[ -f /run/${RC_SVCNAME}.pid ] && eerror "Squid shutdown failed, probably service is already down."

+ 	eend 0

+ }

+ 

+ reload() {

+ 	checkconfig || return 1

+ 	ebegin "Reloading ${RC_SVCNAME} with $command -k reconfigure -f $SQUID_CONF"

+ 	$command -k reconfigure -f $SQUID_CONF -n ${SQUID_SVCNAME}

+ 	eend $?

+ }

+ 

+ rotate() {

+ 	service_started ${RC_SVCNAME} || return 1

+ 	ebegin "Rotating ${RC_SVCNAME} logs with $command -k rotate -f $SQUID_CONF"

+ 	$command -k rotate -f $SQUID_CONF -n ${SQUID_SVCNAME}

+ 	eend $?

+ }

@@ -0,0 +1,19 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=subversion-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC svnserve init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('subversion' 'openrc')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/svnserve')

+ source=(svnserve.initd)

+ sha512sums=('c8de2f1eb3d79cb41ba5d6a4d3551d902e0e94a844351e9d9b6bf097ce5b7789fe78557277500f2ef8a9f63b3bffd7ef4207d97ad10c75ca58dbbae3188bb02f')

+ 

+ package() {

+   install -Dm755 "$srcdir"/svnserve.initd "$pkgdir"/etc/init.d/svnserve

+ }

@@ -0,0 +1,20 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2015 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License, v2 or later

+ 

+ description="svn server"

+ pidfile="/run/svnserve/svnserve.pid"

+ command="/usr/bin/svnserve"

+ command_args="--foreground --daemon ${SVNSERVE_ARGS:---root=/srv/svn}"

+ command_background="true"

+ start_stop_daemon_args="-u ${SVNSERVE_USER:-http} -g ${SVNSERVE_GROUP:-http}"

+ 

+ depend() {

+ 	need net

+ }

+ 

+ start_pre() {

+ 	# Ensure that we run from a readable working dir, and that we do not

+ 	# lock filesystems when being run from such a location.

+ 	cd /

+ }

@@ -0,0 +1,23 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=syncthing-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC syncthing init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'syncthing')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/syncthing')

+ source=('syncthing.'{initd,confd})

+ sha512sums=('b94318d1765edf96d07d4a4a5eb7676b87a30c693846da10106498bc3f9ecc9fd568292e2fc8ab1d338e9347323ad1432d3073eb1af1317b36d29b088497ad1f'

+             'e07569b58c13e441ea12ee11ad6b99304f337490bc4f2eedc43d302bc5b350ba8af91fb6e9f0fec49b58c706dba0892320163b7710d3b52a3371101fb540dc62')

+ 

+ package() {

+   install -Dm755 syncthing.initd "$pkgdir"/etc/init.d/syncthing

+   install -Dm644 syncthing.confd "$pkgdir"/etc/conf.d/syncthing

+ }

@@ -0,0 +1,27 @@ 

+ # /etc/conf.d/syncthing: config file for /etc/init.d/syncthing

+ 

+ # User and group as which to run

+ #SYNCTHING_USER="syncthing"

+ #SYNCTHING_GROUP="syncthing"

+ 

+ # Configuration directory

+ #SYNCTHING_HOMEDIR="/var/lib/syncthing/.config/syncthing"

+ 

+ # Log directory location

+ #SYNCTHING_LOGDIR=/var/log/syncthing

+ 

+ # Log file location

+ #SYNCTHING_LOGFILE="${SYNCTHING_LOGDIR}/syncthing.log"

+ 

+ # umask used to create files

+ # The default allows group access

+ #SYNCTHING_UMASK=007

+ 

+ # I/O nice level of syncthing

+ #SYNCTHING_IONICE="0"

+ 

+ # Nice level of syncthing

+ #SYNCTHING_NICE="0"

+ 

+ # Extra options for syncthing

+ #SYNCTHING_OPTS=""

@@ -0,0 +1,39 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2017 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ SYNCTHING_USER="${SYNCTHING_USER:-root}"

+ SYNCTHING_GROUP="${SYNCTHING_GROUP:-root}"

+ SYNCTHING_HOMEDIR="${SYNCTHING_HOMEDIR:-/var/lib/syncthing/.config/syncthing}"

+ SYNCTHING_LOGDIR="${SYNCTHING_LOGDIR:-/var/log/syncthing}"

+ SYNCTHING_LOGFILE="${SYNCTHING_LOGFILE:-${SYNCTHING_LOGDIR}/syncthing.log}"

+ SYNCTHING_UMASK="${SYNCTHING_UMASK:-007}"

+ SYNCTHING_IONICE="${SYNCTHING_IONICE:-0}"

+ SYNCTHING_NICE="${SYNCTHING_NICE:-0}"

+ 

+ description="Syncthing is an open, trustworthy and decentralized cloud storage system"

+ pidfile="/run/syncthing.pid"

+ supervisor=supervise-daemon

+ command="/usr/bin/syncthing"

+ command_args="-no-browser -home=${SYNCTHING_HOMEDIR} ${SYNCTHING_OPTS}"

+ command_user="${SYNCTHING_USER}:${SYNCTHING_GROUP}"

+ output_log="$SYNCTHING_LOGFILE"

+ error_log="$output_log"

+ 

+ supervisor_daemon_args=" --umask ${SYNCTHING_UMASK} \

+   --ionice ${SYNCTHING_IONICE} \

+   --nicelevel ${SYNCTHING_NICE}"

+ 

+ depend() {

+   need localmount net

+ }

+ 

+ start_pre() {

+   if [ ! -d "$SYNCTHING_HOMEDIR" ]; then

+   	install -d "$SYNCTHING_HOMEDIR"

+ 	chown "$command_user" "$SYNCTHING_HOMEDIR"

+   fi

+ 

+   checkpath -d -o "$command_user" "$SYNCTHING_LOGDIR"

+   checkpath -f -o "$command_user" "$SYNCTHING_LOGFILE"

+ }

@@ -0,0 +1,21 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=syslog-ng-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC syslog-ng init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'syslog-ng')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/syslog-ng')

+ source=("syslog-ng".{confd,initd})

+ sha512sums=('c945d27560afa310ac7f15e0cde3a564d5296892c747827d68df1b49c728998b056b596f93ac2564a5cb349f88db6585de58ec64cdaa13b92f20f5aac213ef44'

+             'db5153ad23385e41eb7e2f2eb8696fc1436ba23df264618abfe2ef51ab44b4ea8a896e27a717cb0a4e13ee28d49d0edf781b271f259d928890e963c563dc550d')

+ 

+ package() {

+   install -Dm755 "$srcdir"/syslog-ng.initd "$pkgdir"/etc/init.d/syslog-ng

+   install -Dm644 "$srcdir"/syslog-ng.confd "$pkgdir"/etc/conf.d/syslog-ng

+ }

@@ -0,0 +1,43 @@ 

+ # 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_CONTROLFILE=${SYSLOG_NG_STATEFILE_DIR}/syslog-ng.ctl

+ # 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=""

@@ -0,0 +1,63 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2018 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ : ${SYSLOG_NG_CONFIGFILE:=/etc/syslog-ng/${RC_SVCNAME}.conf}

+ : ${SYSLOG_NG_STATEFILE_DIR:=/var/lib/${RC_SVCNAME}}

+ : ${SYSLOG_NG_STATEFILE:=${SYSLOG_NG_STATEFILE_DIR}/${RC_SVCNAME}.persist}

+ : ${SYSLOG_NG_PIDFILE_DIR:=/run}

+ : ${SYSLOG_NG_PIDFILE:=${SYSLOG_NG_PIDFILE_DIR}/${RC_SVCNAME}.pid}

+ : ${SYSLOG_NG_CONTROLFILE:=${SYSLOG_NG_PIDFILE_DIR}/${RC_SVCNAME}.ctl}

+ 

+ : ${SYSLOG_NG_GROUP:=root}

+ : ${SYSLOG_NG_USER:=root}

+ 

+ command="/usr/bin/syslog-ng"

+ #command_args_background="--pidfile \"${SYSLOG_NG_PIDFILE}\""

+ command_args="--cfgfile \"${SYSLOG_NG_CONFIGFILE}\" --control \"${SYSLOG_NG_CONTROLFILE}\" --persist-file \"${SYSLOG_NG_STATEFILE}\" --pidfile \"${SYSLOG_NG_PIDFILE}\" ${SYSLOG_NG_OPTS}"

+ supervisor="supervise-daemon"

+ extra_commands="checkconfig"

+ extra_started_commands="reload"

+ #pidfile="${SYSLOG_NG_PIDFILE}"

+ 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}"

+ command_args_foreground="--foreground" # --process-mode=foreground"

+ command_user="${SYSLOG_NG_USER}:${SYSLOG_NG_GROUP}"

+ 

+ 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}"

+ 	${supervisor} ${RC_SVCNAME} --signal HUP --pidfile "${SYSLOG_NG_PIDFILE}"

+ 	eend $?

+ }

@@ -0,0 +1,20 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=thermald-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC thermald init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('dbus-openrc' 'thermald')

+ conflicts=('systemd-sysvcompat')

+ source=("thermald.initd")

+ sha512sums=('35bd031e8c66248ccd4d340803228209c8d2157b38b5880346d49fa7f20cc287f5eb8a2fc661225efc2f52c1ec19445a5ed032d34e9f30f8ccafefc8de5831e8')

+ 

+ package() {

+   install -Dm 755 "$srcdir/thermald.initd" "$pkgdir/etc/init.d/thermald"

+ }

@@ -0,0 +1,12 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2013 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ supervisor=supervise-daemon

+ command="/usr/bin/thermald"

+ command_args="--dbus-enable --no-daemon"

+ 

+ depend() {

+ 	need dbus

+ 	after logger

+ }

@@ -0,0 +1,20 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=tlp-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC tlp init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'tlp')

+ conflicts=('systemd-sysvcompat')

+ source=('tlp.initd')

+ sha512sums=('9851ffe585fd35e6e80cf4fd6114ed70c3fde399122f95d24d4a0a4457048553b014d1959833320082a1e27ab1e693646f3c99214982e869232a691447187f28')

+ 

+ package() {

+   install -Dm755 "$srcdir/tlp.initd" "$pkgdir/etc/init.d/tlp"

+ }

@@ -0,0 +1,25 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2015 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ # $Header: $

+ 

+ description="TLP start/stop actions"

+ 

+ depend() {

+ 	after modules

+ 

+ 	# sysfs is required (bat thresholds); localmount:/usr

+ 	need sysfs localmount

+ 

+ 	# thinkpad-radiosw (USE=deprecated)

+ 	use acpid

+ 

+ 	after NetworkManager dbus bluetooth

+ 

+ 	# run after xdm to avoid bluetooth/wwan/... race-condition with gdm

+ 	after xdm

+ }

+ 

+ start()   { /usr/bin/tlp init start; }

+ stop()    { /usr/bin/tlp init stop; }

+ restart() { /usr/bin/tlp init restart; }

@@ -0,0 +1,32 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=tor-openrc

+ pkgver=20220520

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC tor init script"

+ arch=('any')

+ url="https://github.com/artix-linux/packages-galaxy"

+ license=('GPL2')

+ depends=('openrc' 'tor')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/tor')

+ source=("tor.confd"

+         "tor.initd")

+ sha512sums=('2a4fc0e901a2b4bb3845b7c75b85d43947f14a1f16a3c098b2621bba0ff7cfe8da182d44a0b71de2db68b25b6355f2ffe100b64f9e2e402ec277f25aeec8b326'

+             '4a764d9d7b0d6cab48a20ff060c47a03a8f8d86e5f7e0ef070bb2e7d823177ac2626d54a27d201b03a4747a3009f37ccdee1044bb208961754abfcacc43e617c')

+ 

+ _inst_initd(){

+   install -Dm755 ${srcdir}/$1.initd ${pkgdir}/etc/init.d/$1

+ }

+ 

+ _inst_confd(){

+   install -Dm755 ${srcdir}/$1.confd ${pkgdir}/etc/conf.d/$1

+ }

+ 

+ package() {

+   _inst_confd 'tor'

+   _inst_initd 'tor'

+ }

@@ -0,0 +1,13 @@ 

+ # Location of the torrc configuration file.

+ #conffile="/etc/tor/torrc"

+ 

+ # User to start the tor daemon.

+ # If "User" directive is set in $conffile, then this option is ignored (i.e.

+ # tor is started under root, but it setuids to the specified User after start).

+ #user="tor"

+ 

+ # Timeout for gracefulstop

+ #GRACEFUL_TIMEOUT="60"

+ 

+ # Set the file limit

+ rc_ulimit="-n 30000"

@@ -0,0 +1,41 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2019 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ # sv-d nous, 2021

+ 

+ SVCNAME=tor

+ supervisor="supervise-daemon"

+ command=/usr/bin/tor

+ pidfile=/run/tor/supervise-tor.pid

+ command_args="--hush"

+ command_args_background="--runasdaemon 1 --pidfile ${pidfile}"

+ retry=${GRACEFUL_TIMEOUT:-60}

+ stopsig=INT

+ command_progress=yes

+ 

+ extra_commands="checkconfig"

+ extra_started_commands="reload"

+ description="Anonymizing overlay network for TCP"

+ description_checkconfig="Check for valid config file"

+ description_reload="Reload the configuration"

+ 

+ checkconfig() {

+ 	${command} --verify-config --hush > /dev/null 2>&1

+ 	if [ $? -ne 0 ] ; then

+ 		eerror "Tor configuration (/etc/tor/torrc) is not valid."

+ 		eerror "Example is in /etc/tor/torrc.sample"

+ 		return 1

+ 	fi

+ }

+ 

+ start_pre() {

+ 	checkconfig || return 1

+ 	checkpath -d -m 0755 -o tor:tor /run/tor

+ }

+ 

+ reload() {

+ 	checkconfig || return 1

+ 	ebegin "Reloading Tor configuration"

+ 	start-stop-daemon -s HUP --pidfile ${pidfile}

+ 	eend $?

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: Nathan Owens <ndowens@artixlinux.org>

+ 

+ pkgname=transmission-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC transmission init"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'transmission-cli')

+ conflicts=('systemd-sysvcompat')

+ backup=("etc/conf.d/transmission")

+ source=("transmission".{confd,initd})

+ sha512sums=('0285a6eb6a1412204c0a6f9db292e32782f91f7842e56485dedee546c6ca840054b267bcac32c3d51bd4458c290588a2296352bea7e38e15eb6a1208760b978f'

+             'b9a2b49e6e40b9192bc7debd16de2081f06a67eae806ae322c045dc2e8cad8311c7da4e2ce3c5667ae2a28d5852582288debda12f36c71b020d57f94e182af5d')

+ b2sums=('52cd64646a30ab09926c406022c819f75deb182b04006082d9aa49c91c129f31dd9c9e49456ddb23d746b87c7e157cb859eb09ef9dcd0a798d097469fcb5beba'

+         '34ebb53495aa4339832fbf75f3ff515e15bd93329d0b6d88172589c9024b3b9a16a1c2436dabebb700687ca8d0f7115cd198a665bc51e7ca0b965bc2c929b999')

+ 

+ package() {

+   install -Dm755 "$srcdir"/transmission.initd "$pkgdir"/etc/init.d/transmission

+   install -Dm644 "$srcdir"/transmission.confd "$pkgdir"/etc/conf.d/transmission

+ }

+ 

@@ -0,0 +1,19 @@ 

+ # This is the transmission-daemon configuration file. For other options and

+ # better explanation, take a look at transmission-daemon manual page Note: it's

+ # better to configure some settings (like username/password) in

+ # /var/lib/transmission/config/settings.json to avoid other users see it with `ps`

+ 

+ # Parameters to pass to transmission-daemon

+ # TRANSMISSION_OPTIONS=""

+ 

+ # Run daemon as another user (username or username:groupname)

+ # If you change this setting, chown -R /var/lib/transmission/config <and download directory, check web settings>

+ #runas_user=transmission

+ 

+ # Location of logfile (should be writeable for runas_user user)

+ # Set logfile=syslog to use syslog for logging

+ #logfile=/var/log/transmission/transmission.log

+ #

+ 

+ # Download location

+ #download_dir=

@@ -0,0 +1,49 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2016 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ command="/usr/bin/transmission-daemon"

+ extra_started_commands="reload"

+ description="Transmission is a fast, easy and free bittorrent client"

+ description_start="Start transmission-daemon server and web interface"

+ description_stop="Stop transmission-daemon server and web interface"

+ description_reload="Reload transmission-daemon settings"

+ 

+ rundir=${rundir:-/run/transmission}

+ pidfile=${pidfile:-${rundir}/transmission.pid}

+ config_dir=${config_dir:-/var/lib/transmission/config}

+ download_dir=${download_dir:-/var/lib/transmission/downloads}

+ logfile=${logfile:-/var/log/transmission/transmission.log}

+ runas_user=${runas_user:-transmission:transmission}

+ 

+ retry="TERM/45/QUIT/15"

+ 

+ start_pre() {

+ 	command_args="--config-dir ${config_dir} --pid-file ${pidfile}"

+ 	command_user="${runas_user}"

+ 

+ 	# Call mkdir -p in case parent dirs are missing

+ 	mkdir -p "${rundir}" "${config_dir}" "${download_dir}"

+ 

+ 	# Call checkpath to fixup permissions

+ 	checkpath -d -o "${runas_user}" "${rundir}" "${config_dir}" "${download_dir}" || return

+ 

+ 	if [ ! -e "${config_dir}/settings.json" ]; then

+ 		# Only set download dir if settings don't exist

+ 		# https://bugs.gentoo.org/576640

+ 		command_args="${command_args} --download-dir ${download_dir}"

+ 	fi

+ 

+ 	if [ "${logfile}" != syslog ]; then

+ 		checkpath -d -o "${runas_user}" /var/log/transmission || return

+ 		command_args="${command_args} --logfile ${logfile}"

+ 	fi

+ 

+ 	command_args="${command_args} ${TRANSMISSION_OPTIONS}"

+ }

+ 

+ reload() {

+ 	ebegin "Reloading ${RC_SVCNAME}"

+ 	start-stop-daemon --signal HUP --exec "${command}" --pidfile "${pidfile}"

+ 	eend $?

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=ufw-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC ufw init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'ufw')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/ufw')

+ source=("ufw.confd"

+         "ufw.initd")

+ sha512sums=('a010532c97b9cf83f1fb5fa707228e0542a8b109c76e5942aaf2d6552c63e033d32e39e5a6ac87cb9e2ed4c3fdbc5d03c75127e6378665e592b143bc1eda52c7'

+             'e2da596aa9e6b24a9fb39730c9d0dfec6ca82c84f5841f397357dcf9c8cf97d3de3047624560298dba9bbf2cb43d0e939364093885064d80a4a677168210813d')

+ 

+ package() {

+   install -Dm755 "$srcdir/ufw.initd" "$pkgdir/etc/init.d/ufw"

+   install -Dm644 "$srcdir/ufw.confd" "$pkgdir/etc/conf.d/ufw"

+ }

@@ -0,0 +1,5 @@ 

+ # If equals to "yes", warnings that firewall is disabled

+ # (using `ufw disable') will be suppressed and the service

+ # will be considered started.

+ # Default if unset or another value is "no".

+ ufw_nonfatal_if_disabled=no

@@ -0,0 +1,137 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2011 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ # $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/files/ufw-2.initd,v 1.1 2011/07/24 11:18:22 pva Exp $

+ 

+ depend() {

+ 	before net

+ 	provide firewall

+ }

+ 

+ start() {

+ 	ebegin "Starting ufw"

+ 	_source_file || { eend $?; return $?; }

+ 

+ 	local enabled_in_cfg ret

+ 	_check_if_enabled_in_cfg

+ 	enabled_in_cfg=$?

+ 

+ 	# Avoid "Firewall already started, use 'force-reload'" message that

+ 	# appears if `ufw enable' had been run before start().

+ 	if _status_quiet; then

+ 		eend 0

+ 		return

+ 	fi

+ 

+ 	# The ufw_start function does the same: if ufw is disabled using `ufw disable',

+ 	# ufw_start would not start ufw and return 0, so let's handle this case.

+ 	case $enabled_in_cfg in

+ 	0)

+ 		ufw_start

+ 		ret=$?

+ 		eend $ret "Failed to start ufw."

+ 		;;

+ 	1)

+ 		# see /etc/conf.d/<name>

+ 		if [ "${ufw_nonfatal_if_disabled:-no}" != "yes" ]; then

+ 			ret=1

+ 			eend $ret "Not starting firewall (not enabled), use \"ufw enable\" first."

+ 		else

+ 			ret=0

+ 			eend 0

+ 		fi

+ 		;;

+ 	2)

+ 		ret=1

+ 		eend $ret "Failed to start ufw."

+ 		;;

+ 	esac

+ 

+ 	return $ret

+ }

+ 

+ stop() {

+ 	ebegin "Stopping ufw"

+ 	_source_file || { eend $?; return $?; }

+ 	local enabled_in_cfg ret

+ 	_check_if_enabled_in_cfg

+ 	enabled_in_cfg=$?

+ 

+ 	# Same as above (unless --force is passed to ufw_stop).

+ 	case $enabled_in_cfg in

+ 	0)

+ 		ufw_stop

+ 		ret=$?

+ 		;;

+ 	1)

+ 		einfo "INFO: ufw is configured to be disabled"

+ 		ufw_stop --force

+ 		ret=$?

+ 		;;

+ 	2)

+ 		ret=1

+ 		;;

+ 	esac

+ 

+ 	eend $ret "Failed to stop ufw."

+ 	return $ret

+ }

+ 

+ _status_quiet() {

+ 	# return values: 0 - started, 1 - stopped, 2 - error

+ 	# Does not execute _source_file.

+ 	local ret

+ 	ufw_status > /dev/null

+ 	ret=$?

+ 	# Return values for ufw_status come from /usr/lib/ufw/ufw-init-functions.

+ 	case $ret in

+ 	0) return 0 ;;

+ 	3) return 1 ;;

+ 	*) return 2 ;;

+ 	esac

+ }

+ 

+ _source_file() {

+ 	local sourced_f="/usr/lib/ufw/ufw-init-functions"

+ 	if [ ! -f "$sourced_f" ]; then

+ 		eerror "Cannot find file $sourced_f!"

+ 		return 1

+ 	fi

+ 

+ 	local _path=$PATH

+ 	if ! source "$sourced_f"; then

+ 		# PATH can be broken here, fix it...

+ 		PATH=$_path

+ 		eerror "Error sourcing file $sourced_f"

+ 		return 1

+ 	fi

+ 

+ 	if [ -z "$PATH" ]; then

+ 		PATH=$_path

+ 	else

+ 		PATH="${PATH}:${_path}"

+ 	fi

+ 	return 0

+ }

+ 

+ _check_if_enabled_in_cfg() {

+ 	# Check if user has enabled the firewall with "ufw enable".

+ 	# Return 0 if firewall enabled in configuration file, 1 otherwise, 2 on error.

+ 

+ 	local sourced_f="/etc/ufw/ufw.conf"

+ 	if [ ! -f "$sourced_f" ]; then

+ 		eerror "Cannot find file $sourced_f!"

+ 		return 2

+ 	fi

+ 

+ 	if ! source "$sourced_f"; then

+ 		eerror "Error sourcing file $sourced_f"

+ 		return 2

+ 	fi

+ 

+ 	if [ "$ENABLED" = "yes" ] || [ "$ENABLED" = "YES" ]; then

+ 		return 0

+ 	else

+ 		return 1

+ 	fi

+ }

@@ -0,0 +1,24 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=unbound-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC unbound init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'unbound')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/unbound')

+ source=("unbound.confd"

+         "unbound.initd")

+ sha512sums=('a6baf20b9911734b69784c393c8f38a0bf41c9621ab9332761ecb8b5fdcebf18be7f30a5a77bf3755aa45222b2f27f810a762436c43b03dd74e6806e04d5a90f'

+             'c7d40f1566bdb3560482a3880fbc90a528a029ea56bef12440bc6cdf7a64217301f7e88018596a4993671cab9f05bade18730c5163f4c4d52fad9ebb211f4eb0')

+ 

+ package() {

+   install -Dm755 "$srcdir/unbound.initd" "$pkgdir/etc/init.d/unbound"

+   install -Dm644 "$srcdir/unbound.confd" "$pkgdir/etc/conf.d/unbound"

+ }

@@ -0,0 +1,36 @@ 

+ # /etc/conf.d/unbound

+ 

+ # Configuration file

+ #UNBOUND_CONFFILE="/etc/unbound/unbound.conf"

+ 

+ # PID file

+ # This is a fallback value which should NOT be changed. If you ever need

+ # to change PID file, please change value in configuration file instead!

+ #UNBOUND_PIDFILE="/run/unbound.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.

+ #UNBOUND_SSDARGS="--wait 1000"

+ 

+ # The termination timeout (start-stop-daemon parameter "retry") ensures

+ # that the service will be terminated within a given time (25 + 5 seconds

+ # per default) when you are stopping the service.

+ #UNBOUND_TERMTIMEOUT="TERM/25/KILL/5"

+ 

+ # Options to unbound

+ # See unbound(8) for more details

+ # Notes:

+ # * Do not specify another CONFIGFILE but use the variable above to change the location

+ #UNBOUND_OPTS=""

+ 

+ # If you want to preserve unbound's cache, set the following variable to

+ # a non-zero value. In this case unbound's cache will be dumped to disk

+ # before shutdown and loaded right after start.

+ # To be able to dump and load cache you have to set up keys (use `unbound-control-setup`)

+ # and need to set 'control-enable: yes' in your configuration!

+ # WARNING: If you don't know what you are doing you should NOT use this

+ #          feature. Loading the cache with old or wrong data can result in

+ #          old or wrong data being returned to clients.

+ #UNBOUND_PRESERVE_CACHE=""

@@ -0,0 +1,137 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2018 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ UNBOUND_BINARY=${UNBOUND_BINARY:-"/usr/bin/unbound"}

+ UNBOUND_CACHEFILE=${UNBOUND_CACHEFILE:-"/var/lib/unbound/${SVCNAME}.cache"}

+ UNBOUND_CHECKCONF=${UNBOUND_CHECKCONF:-"/usr/bin/unbound-checkconf"}

+ UNBOUND_CONFFILE=${UNBOUND_CONFFILE:-"/etc/unbound/${SVCNAME}.conf"}

+ UNBOUND_CONTROL=${UNBOUND_CONTROL:-"/usr/bin/unbound-control"}

+ UNBOUND_PIDFILE=${UNBOUND_PIDFILE:-"/run/unbound.pid"}

+ UNBOUND_SSDARGS=${UNBOUND_SSDARGS:-"--wait 1000"}

+ UNBOUND_TERMTIMEOUT=${UNBOUND_TERMTIMEOUT:-"TERM/25/KILL/5"}

+ UNBOUND_OPTS=${UNBOUND_OPTS:-""}

+ UNBOUND_LOAD_CACHE_TIMEOUT=${UNBOUND_LOAD_CACHE_TIMEOUT:-"30"}

+ 

+ getconfig() {

+ 	local key="$1"

+ 	local value_default="$2"

+ 	local value=

+ 

+ 	if service_started ; then

+ 		value="$(service_get_value "${key}")"

+ 	fi

+ 

+ 	if [ -z "${value}" ] && [ -n "${UNBOUND_CONFFILE}" ] && [ -r "${UNBOUND_CONFFILE}" ] ; then

+ 		value=$("${UNBOUND_CHECKCONF}" -o ${key} "${UNBOUND_CONFFILE}")

+ 	fi

+ 

+ 	if [ -z "${value}" ] ; then

+ 		# Value not explicitly set in the configfile or configfile does not exist

+ 		# or is not readable

+ 		echo "${value_default}"

+ 	else

+ 		echo "${value}"

+ 	fi

+ 

+ 	return 0

+ }

+ 

+ command=${UNBOUND_BINARY}

+ command_args="${UNBOUND_OPTS} -c \"${UNBOUND_CONFFILE}\""

+ start_stop_daemon_args="${UNBOUND_SSDARGS}"

+ pidfile="$(getconfig pidfile /run/unbound.pid)"

+ retry="${UNBOUND_TERMTIMEOUT}"

+ 

+ required_files="${UNBOUND_CONFFILE}"

+ 

+ name="unbound daemon"

+ extra_commands="configtest"

+ extra_started_commands="reload save_cache"

+ description="unbound is a Domain Name Server (DNS) that is used to resolve host names to IP address."

+ description_configtest="Run syntax tests for configuration files only."

+ description_reload="Kills all children and reloads the configuration."

+ description_save_cache="Saves the current cache to disk."

+ 

+ depend() {

+ 	use net logger

+ 	provide dns

+ 	after auth-dns

+ }

+ 

+ configtest() {

+ 	local _config_status=

+ 

+ 	ebegin "Checking ${SVCNAME} configuration"

+ 	"${UNBOUND_CHECKCONF}" "${UNBOUND_CONFFILE}" 1>/dev/null 2>&1

+ 	_config_status=$?

+ 

+ 	if [ ${_config_status} -ne 0 ] ; then

+ 		# Run command again but this time we will show the output

+ 		# Ugly, but ...

+ 		"${UNBOUND_CHECKCONF}" "${UNBOUND_CONFFILE}"

+ 	else

+ 		if [ -n "${UNBOUND_PRESERVE_CACHE}" ] ; then

+ 			local _is_control_enabled=$(getconfig control-enable no)

+ 			if [ "${_is_control_enabled}" != "yes" ] ; then

+ 				eerror "Cannot preserve cache: control-enable is 'no' in the config file!"

+ 				_config_status=2

+ 			fi

+ 		fi

+ 	fi

+ 

+ 	eend ${_config_status} "failed, please correct errors above"

+ }

+ 

+ save_cache() {

+ 	if [ "${RC_CMD}" != "restart" ] ; then

+ 		UNBOUND_PRESERVE_CACHE=1 configtest || return 1

+ 	fi

+ 

+ 	ebegin "Saving cache to '${UNBOUND_CACHEFILE}'"

+ 	${UNBOUND_CONTROL} -c "${UNBOUND_CONFFILE}" dump_cache > "${UNBOUND_CACHEFILE}"

+ 	eend $?

+ }

+ 

+ start_pre() {

+ 	if [ "${RC_CMD}" != "restart" ] ; then

+ 		configtest || return 1

+ 	fi

+ }

+ 

+ start_post() {

+ 	if [ -n "${UNBOUND_PRESERVE_CACHE}" ] ; then

+ 		if [ -s "${UNBOUND_CACHEFILE}" ] ; then

+ 			ebegin "Loading cache from '${UNBOUND_CACHEFILE}'"

+ 			# Loading cache can fail which would block this runscript.

+ 			# Using `timeout` from coreutils will be our safeguard ...

+ 			timeout -k 5 ${UNBOUND_LOAD_CACHE_TIMEOUT} ${UNBOUND_CONTROL} -q -c "${UNBOUND_CONFFILE}" load_cache < "${UNBOUND_CACHEFILE}"

+ 			eend $?

+ 		else

+ 			ewarn "Loading cache from '${UNBOUND_CACHEFILE}' skipped: File does not exists or is empty!"

+ 		fi

+ 	fi

+ 

+ 	# It is not a fatal error if preserved cache could not be loaded

+ 	return 0

+ }

+ 

+ stop_pre() {

+ 	if [ "${RC_CMD}" = "restart" ] ; then

+ 		configtest || return 1

+ 	fi

+ 

+ 	if [ -n "${UNBOUND_PRESERVE_CACHE}" ] ; then

+ 		save_cache

+ 	fi

+ 

+ 	# It is not a fatal error if cache cannot be preserved

+ 	return 0

+ }

+ 

+ reload() {

+ 	configtest || return 1

+ 	ebegin "Reloading ${SVCNAME}"

+ 	start-stop-daemon --signal HUP --pidfile "${pidfile}"

+ 	eend $?

+ }

@@ -0,0 +1,26 @@ 

+ 

+ pkgname=virtualgl-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC virtualgl init script"

+ arch=('any')

+ license=('GPL2')

+ depends=('openrc' 'virtualgl')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/vgl')

+ source=("vgl.confd"

+         "vgl.initd"

+ 	"vgl-helper.sh")

+ install=virtualgl.install

+ sha512sums=('bab0ad095a2f075a1923f1b58531101bce634c89b30e77c239ee224b58eac3083c7eba4d21bd997a4dc8b6e4cfb0be7b013732bdf37a27a16a3301a098d60c29'

+             '924151029cb9671b96bd923b5d255c4ce714232f4a3890d6502c05792b29c29375508d0e549bf8c9c69943e3a99c55e19c5a0c3e3a15860266c5464801169367'

+             'd3940abb0c52957e8ec4ea15829151876384703ee5cff7a4d306d6de28f839ff76a9090a3af2106e7e8442104f3e16c57a8430b36d718490cd2637ecb99d9c8e')

+ 

+ package() {

+   install -Dm755 "$srcdir/vgl.initd" "$pkgdir/etc/init.d/vgl"

+   install -Dm644 "$srcdir/vgl.confd" "$pkgdir/etc/conf.d/vgl"

+ 

+   install -Dm755 "${srcdir}/vgl-helper.sh" "${pkgdir}"/usr/lib/vgl-helper.sh

+   install -dm750 "${pkgdir}"/var/lib/VirtualGL

+ }

@@ -0,0 +1,39 @@ 

+ #!/bin/bash

+ 

+ . /etc/vgl.conf

+ 

+ vgl_start() {

+     truncate --size=0 /var/lib/VirtualGL/vgl_xauth_key

+ 

+     set_xauth

+     # Check if XAUTHORITY was set successfully, if not wait up to

+     # 60 seconds to allow X start.

+     tries=120

+     while [ ${tries} -gt 0 ]; do

+         tries=$((tries - 1))

+         if [ -z "${XAUTHORITY}" ]; then

+             sleep 0.5

+             set_xauth

+             continue

+         elif [ ! -e "${XAUTHORITY}" ]; then

+             sleep 0.5

+             # fall through, file not existing yet

+         fi

+         break

+     done

+ 

+     xauth -f /var/lib/VirtualGL/vgl_xauth_key add $DISPLAY . \

+         $(xauth -f $XAUTHORITY list | awk '{print $3;exit}') && \

+         chmod 644 /var/lib/VirtualGL/vgl_xauth_key

+ }

+ 

+ vgl_stop() {

+     rm -f /var/lib/VirtualGL/vgl_xauth_key

+ }

+ 

+ 

+ if [ "${1}" = "start" ]; then

+     vgl_start

+ elif [ "${1}" = "stop" ]; then

+     vgl_stop

+ fi

@@ -0,0 +1,27 @@ 

+ # /etc/conf.d/vgl

+ 

+ DISPLAY="${DISPLAY:-:0}"

+ 

+ # Make it a function in case we have to repeat it in init script later

+ set_xauth() {

+ 

+ # common case (works in almost all tested environments (except of lightdm)):

+ XAUTHORITY="$(ps wwax -C X,Xorg -o args= --sort=-stime | grep -m 1 -o '\B[-]auth\s*/var\S*' | cut -d ' ' -f 2)"

+ 

+ # kdm and some others:

+ # XAUTHORITY="$(find /var/run/xauth/A${DISPLAY}-*|tail -n1)"

+ 

+ # gdm:

+ # XAUTHORITY="/var/gdm/${DISPLAY}.Xauth"

+ 

+ # slim:

+ # XAUTHORITY="/var/run/slim.auth"

+ 

+ # lightdm:

+ # XAUTHORITY="/var/run/lightdm/root/${DISPLAY}"

+ 

+ # lxdm:

+ # XAUTHORITY="/var/run/lxdm/lxdm-${DISPLAY}.auth"

+ 

+ }

+ set_xauth

@@ -0,0 +1,45 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2021 Gentoo Authors

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ # TODO: description="*" and other OpenRC 0.9+ candies

+ 

+ depend() {

+ 	need display-manager

+ 	after sshd

+ }

+ 

+ start() {

+ 	ebegin "Starting VirtualGL"

+ 	truncate --size=0 /var/lib/VirtualGL/vgl_xauth_key

+ 

+   set_xauth

+ 

+   if [ -z "$XAUTHORITY" ]; then

+ 

+     einfo "Waiting for xauthority..."

+ 

+     # wait for xauth file

+     while true; do 

+       set_xauth

+ 

+       if [ -e "$XAUTHORITY" ]; then

+         break;

+       fi

+ 

+       sleep 1

+     done 

+   fi

+ 

+ 

+ 	xauth -f /var/lib/VirtualGL/vgl_xauth_key add $DISPLAY . $(xauth -f $XAUTHORITY list | awk '{print $3;exit}') && \

+ 		chmod 644 /var/lib/VirtualGL/vgl_xauth_key

+ 	eend $?

+ }

+ 

+ stop() {

+ 	ebegin "Stopping VirtualGL"

+ 	[ -f /var/lib/VirtualGL/vgl_xauth_key ] && \

+ 		rm /var/lib/VirtualGL/vgl_xauth_key

+ 	eend $?

+ }

@@ -0,0 +1,4 @@ 

+ post_install() {

+ 	chown root:video /var/lib/VirtualGL

+ 	chmod 0750 /var/lib/VirtualGL

+ }

@@ -0,0 +1,25 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=vnstat-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC vnstat init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'vnstat')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/vnstatd')

+ source=("vnstatd.confd"

+         "vnstatd.initd")

+ install=vnstat.install

+ sha512sums=('2d5370623ac886e424380100474506b6c2076bfb522fd8ead789af41aeb89b7f3f23c6aa85520d7cc84a53d36926a433b631b5bafe837c9ad04ba04dd7e11553'

+             'd819df63a7f6b4a8104a2fd0f754f4e060b2129b8d01e9c275b8b3ff627da7ae128e60d383ff7f0a5b7a86a0692ae935999a2846c25a404ef4f3956b75bde146')

+ 

+ package() {

+   install -Dm755 "$srcdir/vnstatd.initd" "$pkgdir/etc/init.d/vnstatd"

+   install -Dm644 "$srcdir/vnstatd.confd" "$pkgdir/etc/conf.d/vnstatd"

+ }

@@ -0,0 +1,4 @@ 

+ post_install() {

+   groupadd vnstat

+   useradd -d /var/lib/vnstat -s /bin/false -G vnstat -g vnstat vnstat

+ }

@@ -0,0 +1,18 @@ 

+ # /etc/conf.d/vnstatd: config file for /etc/init.d/vnstatd

+ 

+ # Configuration file

+ VNSTATD_CONFIGFILE="/etc/vnstat.conf"

+ 

+ # PID file

+ VNSTATD_PIDFILE="/run/vnstat/vnstatd.pid"

+ 

+ # Options to vnstatd

+ # See vnstatd(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

+ VNSTATD_OPTS=""

+ 

+ # Wait x milliseconds after starting and check that daemon is still running.

+ # See start-stop-daemon(8) for more details

+ SSD_STARTWAIT=500

@@ -0,0 +1,27 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2017 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License v2

+ 

+ name="vnStat daemon"

+ description="vnstatd updates vnStat databases."

+ description_reload="Reload ${name}'s configuration"

+ extra_started_commands="reload"

+ 

+ VNSTATD_CONFIGFILE=${VNSTATD_CONFIGFILE:-"/etc/vnstat.conf"}

+ VNSTATD_PIDFILE=${VNSTATD_PIDFILE:-"/run/vnstat/vnstatd.pid"}

+ 

+ supervisor=supervise-daemon

+ pidfile="${VNSTATD_PIDFILE}"

+ command="/usr/bin/vnstatd"

+ command_args="-n ${VNSTATD_OPTS} --config ${VNSTATD_CONFIGFILE}"

+ required_files="${VNSTATD_CONFIGFILE}"

+ 

+ start_pre() {

+ 	checkpath --directory --mode 0775 --owner vnstat:vnstat $(dirname "${pidfile}")

+ }

+ 

+ reload() {

+ 	ebegin "Reloading ${name} configuration"

+ 	supervisor-daemon vnstatd --signal HUP

+ 	eend $?

+ }

@@ -0,0 +1,23 @@ 

+ # Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>

+ # Contributor: artoo <artoo@artixlinux.org>

+ # Contributor: Oscar Campos <damnwidget@artixlinux.org>

+ 

+ pkgname=vsftpd-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC vsftpd init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'vsftpd')

+ conflicts=('systemd-sysvcompat')

+ source=("vsftpd.initd"

+ 	 "vsftpd-checkconfig.sh")

+ sha512sums=('88a72fa3776687dfd4a1024e7bbd6abf7b4f8981b67014583e2183a7d6d8a0a1a583d055122d541ed3425777f86e3188adab1c6056565902cfa8757fd492f3b8'

+             'be34b1c88548dbf443e9178192e1764b90ecc7ae8261324b86854f9739b0e0b1a65a42f626ccfd5bc2068df7c03f08278cdb6fb91c9b0782200153ffac83e718')

+ 

+ package() {

+   install -Dm755 "$srcdir/vsftpd.initd" "$pkgdir/etc/init.d/vsftpd"

+   install -Dm755 "${srcdir}/vsftpd-checkconfig.sh" "${pkgdir}/usr/lib/vsftpd-checkconfig.sh"

+ }

@@ -0,0 +1,29 @@ 

+ #!/bin/sh

+ 

+ VSFTPD_CONF="${VSFTPD_CONF:-/etc/vsftpd.conf}"

+ 

+ if [ ! -e ${VSFTPD_CONF} ] ; then

+ 	echo "Please setup ${VSFTPD_CONF} before starting vsftpd" >&2

+ 	echo "There are sample configurations in /usr/share/doc/vsftpd" >&2

+ 	exit 1

+ fi

+ 

+ if egrep -iq "^ *background *= *yes" "${VSFTPD_CONF}" ; then

+ 	echo "${VSFTPD_CONF} must not set background=YES" >&2

+ 	exit 1

+ fi

+ 

+ has_ip=false has_ipv6=false ip_error=true

+ egrep -iq "^ *listen *= *yes" "${VSFTPD_CONF}" && has_ip=true

+ egrep -iq "^ *listen_ipv6 *= *yes" "${VSFTPD_CONF}" && has_ipv6=true

+ if ${has_ip} && ! ${has_ipv6} ; then

+ 	ip_error=false

+ elif ! ${has_ip} && ${has_ipv6} ; then

+ 	ip_error=false

+ fi

+ if ${ip_error} ; then

+ 	echo "${VSFTPD_CONF} must contain listen=YES or listen_ipv6=YES" >&2

+ 	echo "but not both" >&2

+ 	exit 1

+ fi

+ 

@@ -0,0 +1,24 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2015 Gentoo Foundation

+ # Distributed under the terms of the GNU General Public License, v2

+ 

+ VSFTPD_NAME=${SVCNAME##*.}

+ VSFTPD_PID="/run/vsftpd.pid"

+ VSFTPD_CONF_DEFAULT="/etc/vsftpd.conf"

+ VSFTPD_CONF=${VSFTPD_CONF:-${VSFTPD_CONF_DEFAULT}}

+ VSFTPD_EXEC=${VSFTPD_EXEC:-/usr/bin/vsftpd}

+ 

+ supervisor=supervise-daemon

+ pidfile="${VSFTPD_PID}"

+ command=vsftpd

+ command_args="${VSFTPD_CONF}"

+ 

+ depend() {

+ 	need net

+ 	use dns logger

+ }

+ 

+ start_pre() {

+ 	VSFTPD_CONF="${VSFTPD_CONF}" \

+ 		/usr/lib/vsftpd-checkconfig.sh || return 1

+ }

@@ -0,0 +1,28 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=wpa_supplicant-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC wpa_supplicant init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'wpa_supplicant')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/wpa_supplicant')

+ source=("wpa_supplicant.confd"

+         "wpa_supplicant.initd"

+         "wpa_cli.sh")

+ sha512sums=('6bbb9d4f6132b3d4e20cd65f27245ccadd60712ef5794261499f882057a930a393297e491d8147e04e30c0a53645af0eb3514332587118c19b5594f23f1d62ad'

+             '18e16792193316d2e516965e05d54a8af938a0de61969ced28332f8772a65a48b7c1364a9c42704786b36a82c8767f735fdd960d97b1e15565ed17dd8ba60fe9'

+             '4e1f64f44ea0e41f62f2d34d0b02d54cb25040255e23dd74deeafeca9279e7646a72a3043692faf334424441c6b57d03cf430d00fe740621b417a7af0f146b7a')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/wpa_supplicant.initd "${pkgdir}"/etc/init.d/wpa_supplicant

+   install -Dm644 "${srcdir}"/wpa_supplicant.confd "${pkgdir}"/etc/conf.d/wpa_supplicant

+ 

+   install -Dm755 "${srcdir}"/wpa_cli.sh "${pkgdir}"/etc/wpa_supplicant/wpa_cli.sh

+ }

+ 

+ 

@@ -0,0 +1,46 @@ 

+ #!/bin/sh

+ # Copyright 1999-2011 Gentoo Foundation

+ # Written by Roy Marples <uberlord@gentoo.org>

+ # Distributed under the terms of the GNU General Public License v2

+ # Alternatively, this file may be distributed under the terms of the BSD License

+ 

+ if [ -z "$1" -o -z "$2" ]; then

+ 	logger -t wpa_cli "Insufficient parameters"

+ 	exit 1

+ fi

+ 

+ INTERFACE="$1"

+ ACTION="$2"

+ 

+ # Note, the below action must NOT mark the interface down via ifconfig, ip or

+ # similar. Addresses can be removed, changed and daemons can be stopped, but

+ # the interface must remain up for wpa_supplicant to work.

+ 

+ if [ -f /etc/parabola-release ]; then

+ 	EXEC="/etc/init.d/net.${INTERFACE} --quiet"

+ else

+ 	logger -t wpa_cli "I don't know what to do with this distro!"

+ 	exit 1

+ fi

+ 

+ case ${ACTION} in

+ 	CONNECTED)

+ 		EXEC="${EXEC} start"

+ 		;;

+ 	DISCONNECTED)

+ 		# Deactivated, since stopping /etc/init.d/net.wlanX

+ 		# stops the network completly.

+ 		EXEC="false ${EXEC} stop"

+ 		;;

+ 	*)

+ 		logger -t wpa_cli "Unknown action ${ACTION}"

+ 		exit 1

+ 		;;

+ esac

+ 

+ # ${EXEC} can use ${IN_BACKGROUND} so that it knows that the user isn't

+ # stopping the interface and a background process - like wpa_cli - is.

+ export IN_BACKGROUND=true

+ 

+ logger -t wpa_cli "interface ${INTERFACE} ${ACTION}"

+ ${EXEC} || logger -t wpa_cli "executing '${EXEC}' failed"

@@ -0,0 +1,10 @@ 

+ # conf.d file for wpa_supplicant

+ 

+ # uncomment this if wpa_supplicant starts up before your network interface

+ # is ready and it causes issues

+ # rc_want="dev-settle"

+ 

+ # Please check man 8 wpa_supplicant for more information about the options

+ # wpa_supplicant accepts.

+ #

+ wpa_supplicant_args=""

@@ -0,0 +1,70 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright (c) 2009 Roy Marples <roy@marples.name>

+ # All rights reserved. Released under the 2-clause BSD license.

+ 

+ command=/usr/bin/wpa_supplicant

+ : ${wpa_supplicant_conf:=/etc/wpa_supplicant/wpa_supplicant.conf}

+ wpa_supplicant_if=${wpa_supplicant_if:+-i}$wpa_supplicant_if

+ command_args="$wpa_supplicant_args -B -c$wpa_supplicant_conf $wpa_supplicant_if"

+ name="WPA Supplicant Daemon"

+ 

+ depend()

+ {

+ 	need localmount

+ 	use logger

+ 	after bootmisc modules

+ 	before dns dhcpcd net

+ 	keyword -shutdown

+ }

+ 

+ find_wireless()

+ {

+ 	local iface=

+ 

+ 	case "$RC_UNAME" in

+ 	Linux)

+ 		for iface in /sys/class/net/*; do

+ 			if [ -e "$iface"/wireless -o \

+ 				-e "$iface"/phy80211 ]

+ 			then

+ 				echo "${iface##*/}"

+ 				return 0

+ 			fi

+ 		done

+ 		;;

+ 	*)

+ 		for iface in /dev/net/* $(ifconfig -l 2>/dev/null); do

+ 			if ifconfig "${iface##*/}" 2>/dev/null | \

+ 				grep -q "[ ]*ssid "

+ 			then

+ 				echo "${iface##*/}"

+ 				return 0

+ 			fi

+ 		done

+ 		;;

+ 	esac

+ 

+ 	return 1

+ }

+ 

+ append_wireless()

+ {

+ 	local iface= i=

+ 

+ 	iface=$(find_wireless)

+ 	if [ -n "$iface" ]; then

+ 		for i in $iface; do

+ 			command_args="$command_args -i$i"

+ 		done

+ 	else

+ 		eerror "Could not find a wireless interface"

+ 	fi

+ }

+ 

+ start_pre()

+ {

+ 	case " $command_args" in

+ 	*" -i"*) ;;

+ 	*) append_wireless;;

+ 	esac

+ }

@@ -0,0 +1,22 @@ 

+ # Maintainer: artoo <artoo@artixlinux.org>

+ 

+ pkgname=xinetd-openrc

+ pkgver=20220521

+ pkgrel=1

+ pkgrel+=.nonsystemd1

+ pkgdesc="OpenRC xinetd init script"

+ arch=('any')

+ url="https://gitea.artixlinux.org/artixlinux/packages-openrc"

+ license=('GPL2')

+ depends=('openrc' 'xinetd')

+ conflicts=('systemd-sysvcompat')

+ backup=('etc/conf.d/xinetd')

+ source=("xinetd.confd"

+         "xinetd.initd")

+ sha512sums=('03bf05e544c0e52bc2bdeadf494dabd49ace985687b656baae869be99ef65a5f7129492c37e062bf6f196f70561d6239f2d3c4e8171fddc04729d3e266bfe2b2'

+             'a30e43b2824d790b28cd2a80fd5e97f0b42ff5119cfacabf501a30918fa0d70517b6ecd00d74cf5edcc029a4d6c536dda062fa4b50044f7bcee09db319109c63')

+ 

+ package() {

+   install -Dm755 "${srcdir}"/xinetd.confd "${pkgdir}"/etc/conf.d/xinetd

+   install -Dm755 "${srcdir}"/xinetd.initd "${pkgdir}"/etc/init.d/xinetd

+ }

@@ -0,0 +1,3 @@ 

+ # /etc/conf.d/xinetd: config file for /etc/init.d/xinetd

+ 

+ XINETD_OPTS="-stayalive -reuse"

@@ -0,0 +1,23 @@ 

+ #!/usr/bin/openrc-run

+ # Copyright 1999-2011 Gentoo Foundation

+ # Distributed under the terms of the BSD License

+ 

+ extra_started_commands="reload dump"

+ 

+ supervisor=supervise-daemon

+ pidfile=/run/xinetd.pid

+ command=xinetd

+ command_args="${XINETD_OPTS} -dontfork"

+ 

+ depend() {

+ 	use net

+ }

+ 

+ do_sig() {

+ 	local sig=$1 ; shift

+ 	ebegin "$*"

+ 	supervise-daemon "$command" --signal ${sig}

+ 	eend $?

+ }

+ reload() { do_sig HUP  "Reloading configuration" ; }

+ dump()   { do_sig USR1 "Dumping configuration" ; }

This PR is a WIP, related issue: #3290

1 new commit added

  • added nonsystemd pkgrel
2 years ago

4 new commits added

  • firewalld-openrc
  • displaymanager-openrc
  • chrony-openrc
  • bluez-openrc
2 years ago

16 new commits added

  • mpd-openrc
  • metalog-openrc
  • mdadm-openrc
  • lvm2-openrc
  • lm_sensors-openrc
  • lirc-openrc
  • lighttpd-openrc
  • libvirt-openrc
  • laptop-mode-tools-openrc
  • krb5-openrc
  • iptables-openrc
  • inetutils-openrc
  • hostapd-openrc
  • hdparm-openrc
  • haveged-openrc
  • gpm-openrc
2 years ago

15 new commits added

  • privoxy-openrc
  • postgresql-openrc
  • postfix-openrc
  • pcsclite-openrc
  • openvpn-openrc
  • openssh-openrc
  • opensmtpd-openrc
  • openntpd-openrc
  • openldap-openrc
  • opendmarc-openrc
  • opendkim-openrc
  • ntp-openrc
  • nginx-openrc
  • nftables-openrc
  • nfs-utils-openrc
2 years ago

12 new commits added

  • tor-openrc
  • tlp-openrc
  • thermald-openrc
  • syslog-ng-openrc
  • syncthing-openrc
  • subversion-openrc
  • squid-openrc
  • spamassassin-openrc
  • samba-openrc
  • rsync-openrc
  • rpcbind-openrc
  • quota-tools-openrc
2 years ago

8 new commits added

  • xinetd-openrc
  • wpa_supplicant-openrc
  • vsftpd-openrc
  • vnstat-openrc
  • virtualgl-openrc
  • unbound-openrc
  • ufw-openrc
  • transmission-cli
2 years ago

3 new commits added

  • mariadb-openrc
  • php-fpm-openrc
  • device-mapper-openrc
2 years ago

3 new commits added

  • distcc-openrc
  • bitlbee-openrc
  • clamav-openrc
2 years ago

1 new commit added

  • Uncomment pid
2 years ago

rebased onto d77a126

2 years ago
Metadata
Changes Summary 284
+25
file added
nonsystemd/acpid-openrc/PKGBUILD
+6
file added
nonsystemd/acpid-openrc/acpid.confd
+22
file added
nonsystemd/acpid-openrc/acpid.initd
+23
file added
nonsystemd/alsa-utils-openrc/PKGBUILD
+15
file added
nonsystemd/alsa-utils-openrc/alsasound.confd
+87
file added
nonsystemd/alsa-utils-openrc/alsasound.initd
+37
file added
nonsystemd/apache-openrc/PKGBUILD
+74
file added
nonsystemd/apache-openrc/httpd.confd
+181
file added
nonsystemd/apache-openrc/httpd.initd
+18
file added
nonsystemd/apparmor-openrc/PKGBUILD
+91
file added
nonsystemd/apparmor-openrc/apparmor.initd
+28
file added
nonsystemd/avahi-openrc/PKGBUILD
+32
file added
nonsystemd/avahi-openrc/autoipd-openrc.sh
+31
file added
nonsystemd/avahi-openrc/avahi-daemon.initd
+30
file added
nonsystemd/avahi-openrc/avahi-dnsconfd.initd
+22
file added
nonsystemd/bind-openrc/PKGBUILD
+48
file added
nonsystemd/bind-openrc/named.confd
+252
file added
nonsystemd/bind-openrc/named.initd
+22
file added
nonsystemd/bitlbee-openrc/PKGBUILD
+7
file added
nonsystemd/bitlbee-openrc/bitlbee.confd
+7
file added
nonsystemd/bitlbee-openrc/bitlbee.initd
+18
file added
nonsystemd/bluez-openrc/PKGBUILD
+13
file added
nonsystemd/bluez-openrc/bluetoothd.initd
+18
file added
nonsystemd/brltty-openrc/PKGBUILD
+12
file added
nonsystemd/brltty-openrc/brltty.initd
+27
file added
nonsystemd/chrony-openrc/PKGBUILD
+17
file added
nonsystemd/chrony-openrc/chrony.confd
+78
file added
nonsystemd/chrony-openrc/chrony.initd
+24
file added
nonsystemd/clamav-openrc/PKGBUILD
+7
file added
nonsystemd/clamav-openrc/clamd.confd
+128
file added
nonsystemd/clamav-openrc/clamd.initd
+12
file added
nonsystemd/clamav-openrc/clamd.install
+24
file added
nonsystemd/connman-openrc/PKGBUILD
+16
file added
nonsystemd/connman-openrc/connmand.confd
+12
file added
nonsystemd/connman-openrc/connmand.initd
+24
file added
nonsystemd/cpupower-openrc/PKGBUILD
+36
file added
nonsystemd/cpupower-openrc/cpupower.confd
+41
file added
nonsystemd/cpupower-openrc/cpupower.initd
+22
file added
nonsystemd/cryptsetup-openrc/PKGBUILD
+112
file added
nonsystemd/cryptsetup-openrc/dmcrypt.confd
+350
file added
nonsystemd/cryptsetup-openrc/dmcrypt.initd
+19
file added
nonsystemd/cups-openrc/PKGBUILD
+23
file added
nonsystemd/cups-openrc/cupsd.initd
+18
file added
nonsystemd/cyrus-sasl-openrc/PKGBUILD
+19
file added
nonsystemd/cyrus-sasl-openrc/saslauthd.confd
+10
file added
nonsystemd/cyrus-sasl-openrc/saslauthd.initd
+27
file added
nonsystemd/device-mapper-openrc/PKGBUILD
+1
file added
nonsystemd/device-mapper-openrc/device-mapper.confd
+146
file added
nonsystemd/device-mapper-openrc/device-mapper.initd
+25
file added
nonsystemd/device-mapper-openrc/dmeventd.initd
+37
file added
nonsystemd/dhcp-openrc/PKGBUILD
+28
file added
nonsystemd/dhcp-openrc/dhcpd.confd
+119
file added
nonsystemd/dhcp-openrc/dhcpd.initd
+16
file added
nonsystemd/dhcp-openrc/dhcrelay.confd
+33
file added
nonsystemd/dhcp-openrc/dhcrelay.initd
+8
file added
nonsystemd/dhcp-openrc/dhcrelay6.confd
+18
file added
nonsystemd/dhcpcd-openrc/PKGBUILD
+19
file added
nonsystemd/dhcpcd-openrc/dhcpcd.initd
+30
file added
nonsystemd/displaymanager-openrc/PKGBUILD
+3
file added
nonsystemd/displaymanager-openrc/displaymanager.install
+25
file added
nonsystemd/displaymanager-openrc/startDM.sh
+13
file added
nonsystemd/displaymanager-openrc/xdm-setup.initd
+10
file added
nonsystemd/displaymanager-openrc/xdm.confd
+132
file added
nonsystemd/displaymanager-openrc/xdm.initd
+21
file added
nonsystemd/distcc-openrc/PKGBUILD
+43
file added
nonsystemd/distcc-openrc/distcc.confd
+16
file added
nonsystemd/distcc-openrc/distcc.initd
+23
file added
nonsystemd/dovecot-openrc/PKGBUILD
+2
file added
nonsystemd/dovecot-openrc/dovecot.confd
+39
file added
nonsystemd/dovecot-openrc/dovecot.initd
+29 -31
file changed
nonsystemd/elogind/PKGBUILD
+24
file added
nonsystemd/espeakup-openrc/PKGBUILD
+9
file added
nonsystemd/espeakup-openrc/espeakup.confd
+12
file added
nonsystemd/espeakup-openrc/espeakup.initd
+22
file added
nonsystemd/exim-openrc/PKGBUILD
+8
file added
nonsystemd/exim-openrc/exim.confd
+20
file added
nonsystemd/exim-openrc/exim.initd
+22
file added
nonsystemd/fcron-openrc/PKGBUILD
+7
file added
nonsystemd/fcron-openrc/fcron.confd
+100
file added
nonsystemd/fcron-openrc/fcron.initd
+22
file added
nonsystemd/firewalld-openrc/PKGBUILD
+14
file added
nonsystemd/firewalld-openrc/firewalld.initd
+18
file added
nonsystemd/fuse-openrc/PKGBUILD
+35
file added
nonsystemd/fuse-openrc/fuse.initd
+24
file added
nonsystemd/git-openrc/PKGBUILD
+19
file added
nonsystemd/git-openrc/git-daemon.confd
+13
file added
nonsystemd/git-openrc/git-daemon.initd
+18
file added
nonsystemd/glibc-openrc/PKGBUILD
+85
file added
nonsystemd/glibc-openrc/nscd.initd
+24
file added
nonsystemd/gpm-openrc/PKGBUILD
+23
file added
nonsystemd/gpm-openrc/gpm.confd
+28
file added
nonsystemd/gpm-openrc/gpm.initd
+22
file added
nonsystemd/haveged-openrc/PKGBUILD
+9
file added
nonsystemd/haveged-openrc/haveged.confd
+14
file added
nonsystemd/haveged-openrc/haveged.initd
+24
file added
nonsystemd/hdparm-openrc/PKGBUILD
+26
file added
nonsystemd/hdparm-openrc/hdparm.confd
+60
file added
nonsystemd/hdparm-openrc/hdparm.initd
+24
file added
nonsystemd/hostapd-openrc/PKGBUILD
+5
file added
nonsystemd/hostapd-openrc/hostapd.confd
+21
file added
nonsystemd/hostapd-openrc/hostapd.initd
+20
file added
nonsystemd/inetutils-openrc/PKGBUILD
+8
file added
nonsystemd/inetutils-openrc/ftpd.confd
+26
file added
nonsystemd/inetutils-openrc/ftpd.initd
+38
file added
nonsystemd/iptables-openrc/PKGBUILD
+11
file added
nonsystemd/iptables-openrc/ebtables.confd
+101
file added
nonsystemd/iptables-openrc/ebtables.initd
+27
file added
nonsystemd/iptables-openrc/ip6tables.confd
+19
file added
nonsystemd/iptables-openrc/iptables.confd
+165
file added
nonsystemd/iptables-openrc/iptables.initd
+24
file added
nonsystemd/krb5-openrc/PKGBUILD
+25
file added
nonsystemd/krb5-openrc/krb5kadmind.initd
+24
file added
nonsystemd/krb5-openrc/krb5kdc.initd
+24
file added
nonsystemd/krb5-openrc/krb5kpropd.initd
+21
file added
nonsystemd/laptop-mode-tools-openrc/PKGBUILD
+52
file added
nonsystemd/laptop-mode-tools-openrc/laptop_mode.initd
+39
file added
nonsystemd/libvirt-openrc/PKGBUILD
+68
file added
nonsystemd/libvirt-openrc/libvirt-guests.confd
+237
file added
nonsystemd/libvirt-openrc/libvirt-guests.initd
+18
file added
nonsystemd/libvirt-openrc/libvirtd.confd
+32
file added
nonsystemd/libvirt-openrc/libvirtd.initd
+23
file added
nonsystemd/libvirt-openrc/virtlockd.initd
+23
file added
nonsystemd/libvirt-openrc/virtlogd.initd
+22
file added
nonsystemd/lighttpd-openrc/PKGBUILD
+8
file added
nonsystemd/lighttpd-openrc/lighttpd.confd
+35
file added
nonsystemd/lighttpd-openrc/lighttpd.initd
+9
file added
nonsystemd/lighttpd-openrc/lighttpd.logrotate
+34
file added
nonsystemd/lirc-openrc/PKGBUILD
+9
file added
nonsystemd/lirc-openrc/irexec.confd
+27
file added
nonsystemd/lirc-openrc/irexec.initd
+22
file added
nonsystemd/lirc-openrc/lircd.confd
+51
file added
nonsystemd/lirc-openrc/lircd.initd
+4
file added
nonsystemd/lirc-openrc/lircmd.confd
+10
file added
nonsystemd/lirc-openrc/lircmd.initd
+32
file added
nonsystemd/lm_sensors-openrc/PKGBUILD
+16
file added
nonsystemd/lm_sensors-openrc/fancontrol.confd
+21
file added
nonsystemd/lm_sensors-openrc/fancontrol.initd
+4
file added
nonsystemd/lm_sensors-openrc/lm_sensors.confd
+21
file added
nonsystemd/lm_sensors-openrc/lm_sensors.initd
+19
file added
nonsystemd/lm_sensors-openrc/sensord.confd
+19
file added
nonsystemd/lm_sensors-openrc/sensord.initd
+32
file added
nonsystemd/lvm2-openrc/PKGBUILD
+38
file added
nonsystemd/lvm2-openrc/lvm-monitoring.initd
+9
file added
nonsystemd/lvm2-openrc/lvm.confd
+173
file added
nonsystemd/lvm2-openrc/lvm.initd
+17
file added
nonsystemd/lvm2-openrc/lvmpolld.initd
+21
file added
nonsystemd/mariadb-openrc/PKGBUILD
+38
file added
nonsystemd/mariadb-openrc/mariadb-supervise.initd
+36
file added
nonsystemd/mariadb-openrc/mariadb.initd
+30
file added
nonsystemd/mdadm-openrc/PKGBUILD
+7
file added
nonsystemd/mdadm-openrc/mdadm.confd
+25
file added
nonsystemd/mdadm-openrc/mdadm.initd
+11
file added
nonsystemd/mdadm-openrc/mdraid.confd
+39
file added
nonsystemd/mdadm-openrc/mdraid.initd
+22
file added
nonsystemd/metalog-openrc/PKGBUILD
+18
file added
nonsystemd/metalog-openrc/metalog.confd
+27
file added
nonsystemd/metalog-openrc/metalog.initd
+26
file added
nonsystemd/mpd-openrc/PKGBUILD
+7
file added
nonsystemd/mpd-openrc/mpd.confd
+22
file added
nonsystemd/mpd-openrc/mpd.initd
+45 -75
file changed
nonsystemd/networkmanager/PKGBUILD
+43
file added
nonsystemd/nfs-utils-openrc/PKGBUILD
+38
file added
nonsystemd/nfs-utils-openrc/nfs.confd
+128
file added
nonsystemd/nfs-utils-openrc/nfs.initd
+18
file added
nonsystemd/nfs-utils-openrc/nfsclient.confd
+33
file added
nonsystemd/nfs-utils-openrc/nfsclient.initd
+23
file added
nonsystemd/nfs-utils-openrc/rpc.gssd.initd
+25
file added
nonsystemd/nfs-utils-openrc/rpc.idmapd.initd
+32
file added
nonsystemd/nfs-utils-openrc/rpc.pipefs.initd
+32
file added
nonsystemd/nfs-utils-openrc/rpc.statd.initd
+23
file added
nonsystemd/nfs-utils-openrc/rpc.svcgssd.initd
+35
file added
nonsystemd/nftables-openrc/PKGBUILD
+26
file added
nonsystemd/nftables-openrc/nftables-mk.confd
+104
file added
nonsystemd/nftables-openrc/nftables-mk.initd
+60
file added
nonsystemd/nftables-openrc/nftables-mk.sh
+19
file added
nonsystemd/nftables-openrc/nftables.confd
+124
file added
nonsystemd/nftables-openrc/nftables.initd
+150
file added
nonsystemd/nftables-openrc/nftables.sh
+21
file added
nonsystemd/nginx-openrc/PKGBUILD
+32
file added
nonsystemd/nginx-openrc/nginx.confd
+92
file added
nonsystemd/nginx-openrc/nginx.initd
+33
file added
nonsystemd/ntp-openrc/PKGBUILD
+21
file added
nonsystemd/ntp-openrc/ntp-client.confd
+31
file added
nonsystemd/ntp-openrc/ntp-client.initd
+6
file added
nonsystemd/ntp-openrc/ntpd.confd
+25
file added
nonsystemd/ntp-openrc/ntpd.initd
+4
file added
nonsystemd/ntp-openrc/sntp.confd
+26
file added
nonsystemd/ntp-openrc/sntp.initd
+18
file added
nonsystemd/opendkim-openrc/PKGBUILD
+54
file added
nonsystemd/opendkim-openrc/opendkim.initd
+22
file added
nonsystemd/opendmarc-openrc/PKGBUILD
+3
file added
nonsystemd/opendmarc-openrc/opendmarc.confd
+54
file added
nonsystemd/opendmarc-openrc/opendmarc.initd
+22
file added
nonsystemd/openldap-openrc/PKGBUILD
+14
file added
nonsystemd/openldap-openrc/slapd.confd
+64
file added
nonsystemd/openldap-openrc/slapd.initd
+24
file added
nonsystemd/openntpd-openrc/PKGBUILD
+7
file added
nonsystemd/openntpd-openrc/ntpd.confd
+14
file added
nonsystemd/openntpd-openrc/ntpd.initd
+5 -28
file changed
nonsystemd/openrc/PKGBUILD
+18
file added
nonsystemd/opensmtpd-openrc/PKGBUILD
+27
file added
nonsystemd/opensmtpd-openrc/opensmtpd.initd
+23
file added
nonsystemd/openssh-openrc/PKGBUILD
+33
file added
nonsystemd/openssh-openrc/sshd.confd
+94
file added
nonsystemd/openssh-openrc/sshd.initd
+21
file added
nonsystemd/openvpn-openrc/PKGBUILD
+18
file added
nonsystemd/openvpn-openrc/openvpn.confd
+133
file added
nonsystemd/openvpn-openrc/openvpn.initd
+21
file added
nonsystemd/pcsclite-openrc/PKGBUILD
+7
file added
nonsystemd/pcsclite-openrc/pcscd.confd
+22
file added
nonsystemd/pcsclite-openrc/pcscd.initd
+19
file added
nonsystemd/php-fpm-openrc/PKGBUILD
+93
file added
nonsystemd/php-fpm-openrc/php-fpm.initd
+40 -33
file changed
nonsystemd/polkit/PKGBUILD
+24
file added
nonsystemd/polkit/meson-0.61.diff
+20
file added
nonsystemd/postfix-openrc/PKGBUILD
+85
file added
nonsystemd/postfix-openrc/postfix.initd
+21
file added
nonsystemd/postgresql-openrc/PKGBUILD
+65
file added
nonsystemd/postgresql-openrc/postgresql.confd
+155
file added
nonsystemd/postgresql-openrc/postgresql.initd
+5
file added
nonsystemd/postgresql-openrc/postgresql.install
+21
file added
nonsystemd/privoxy-openrc/PKGBUILD
+13
file added
nonsystemd/privoxy-openrc/privoxy.initd
+22
file added
nonsystemd/quota-tools-openrc/PKGBUILD
+20
file added
nonsystemd/quota-tools-openrc/quota.confd
+37
file added
nonsystemd/quota-tools-openrc/quota.initd
+25
file added
nonsystemd/quota-tools-openrc/rpc.rquotad.initd
+18
file added
nonsystemd/rpcbind-openrc/PKGBUILD
+21
file added
nonsystemd/rpcbind-openrc/rpcbind.initd
+21
file added
nonsystemd/rsync-openrc/PKGBUILD
+5
file added
nonsystemd/rsync-openrc/rsyncd.confd
+13
file added
nonsystemd/rsync-openrc/rsyncd.initd
+21
file added
nonsystemd/samba-openrc/PKGBUILD
+45
file added
nonsystemd/samba-openrc/smb.confd
+55
file added
nonsystemd/samba-openrc/smb.initd
+21
file added
nonsystemd/spamassassin-openrc/PKGBUILD
+30
file added
nonsystemd/spamassassin-openrc/spamassassin.confd
+38
file added
nonsystemd/spamassassin-openrc/spamassassin.initd
+26
file added
nonsystemd/squid-openrc/PKGBUILD
+18
file added
nonsystemd/squid-openrc/squid.confd
+135
file added
nonsystemd/squid-openrc/squid.initd
+19
file added
nonsystemd/subversion-openrc/PKGBUILD
+20
file added
nonsystemd/subversion-openrc/svnserve.initd
+23
file added
nonsystemd/syncthing-openrc/PKGBUILD
+27
file added
nonsystemd/syncthing-openrc/syncthing.confd
+39
file added
nonsystemd/syncthing-openrc/syncthing.initd
+21
file added
nonsystemd/syslog-ng-openrc/PKGBUILD
+43
file added
nonsystemd/syslog-ng-openrc/syslog-ng.confd
+63
file added
nonsystemd/syslog-ng-openrc/syslog-ng.initd
+20
file added
nonsystemd/thermald-openrc/PKGBUILD
+12
file added
nonsystemd/thermald-openrc/thermald.initd
+20
file added
nonsystemd/tlp-openrc/PKGBUILD
+25
file added
nonsystemd/tlp-openrc/tlp.initd
+32
file added
nonsystemd/tor-openrc/PKGBUILD
+13
file added
nonsystemd/tor-openrc/tor.confd
+41
file added
nonsystemd/tor-openrc/tor.initd
+24
file added
nonsystemd/transmission-openrc/PKGBUILD
+19
file added
nonsystemd/transmission-openrc/transmission.confd
+49
file added
nonsystemd/transmission-openrc/transmission.initd
+24
file added
nonsystemd/ufw-openrc/PKGBUILD
+5
file added
nonsystemd/ufw-openrc/ufw.confd
+137
file added
nonsystemd/ufw-openrc/ufw.initd
+24
file added
nonsystemd/unbound-openrc/PKGBUILD
+36
file added
nonsystemd/unbound-openrc/unbound.confd
+137
file added
nonsystemd/unbound-openrc/unbound.initd
+26
file added
nonsystemd/virtualgl-openrc/PKGBUILD
+39
file added
nonsystemd/virtualgl-openrc/vgl-helper.sh
+27
file added
nonsystemd/virtualgl-openrc/vgl.confd
+45
file added
nonsystemd/virtualgl-openrc/vgl.initd
+4
file added
nonsystemd/virtualgl-openrc/virtualgl.install
+25
file added
nonsystemd/vnstat-openrc/PKGBUILD
+4
file added
nonsystemd/vnstat-openrc/vnstat.install
+18
file added
nonsystemd/vnstat-openrc/vnstatd.confd
+27
file added
nonsystemd/vnstat-openrc/vnstatd.initd
+23
file added
nonsystemd/vsftpd-openrc/PKGBUILD
+29
file added
nonsystemd/vsftpd-openrc/vsftpd-checkconfig.sh
+24
file added
nonsystemd/vsftpd-openrc/vsftpd.initd
+28
file added
nonsystemd/wpa_supplicant-openrc/PKGBUILD
+46
file added
nonsystemd/wpa_supplicant-openrc/wpa_cli.sh
+10
file added
nonsystemd/wpa_supplicant-openrc/wpa_supplicant.confd
+70
file added
nonsystemd/wpa_supplicant-openrc/wpa_supplicant.initd
+22
file added
nonsystemd/xinetd-openrc/PKGBUILD
+3
file added
nonsystemd/xinetd-openrc/xinetd.confd
+23
file added
nonsystemd/xinetd-openrc/xinetd.initd