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