diff options
Diffstat (limited to 'nonsystemd')
-rw-r--r-- | nonsystemd/avahi-openrc/PKGBUILD | 26 | ||||
-rw-r--r-- | nonsystemd/avahi-openrc/autoipd-openrc.sh | 32 | ||||
-rw-r--r-- | nonsystemd/avahi-openrc/avahi-daemon.initd | 31 | ||||
-rw-r--r-- | nonsystemd/avahi-openrc/avahi-dnsconfd.initd | 30 |
4 files changed, 119 insertions, 0 deletions
diff --git a/nonsystemd/avahi-openrc/PKGBUILD b/nonsystemd/avahi-openrc/PKGBUILD new file mode 100644 index 000000000..593faab6b --- /dev/null +++ b/nonsystemd/avahi-openrc/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: artoo <artoo@artixlinux.org> + +pkgname=avahi-openrc +pkgver=20210505 +pkgrel=2 +pkgdesc="OpenRC avahi init script" +arch=('any') +url="https://gitea.artixlinux.org/artixlinux/packages-openrc" +license=('GPL2') +groups=('openrc-world') +provides=('init-avahi') +depends=('avahi' 'openrc') +conflicts=('init-avahi') +source=('avahi-daemon.initd' + 'avahi-dnsconfd.initd' + 'autoipd-openrc.sh') +sha256sums=('0e6513b19d79edfe8d3a124e15fe48ee3cfa073fa93971c2265d82c4df7caa10' + 'a359e718f6c0be654ded4f27e2215067564358d43e17d9a99d5d65c8379eb815' + '064a4cedc00f67e93a6f2ef99489e2614305a673a75a2135010283e99da6d6bf') + +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 +} diff --git a/nonsystemd/avahi-openrc/autoipd-openrc.sh b/nonsystemd/avahi-openrc/autoipd-openrc.sh new file mode 100644 index 000000000..749085228 --- /dev/null +++ b/nonsystemd/avahi-openrc/autoipd-openrc.sh @@ -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 "${?}" +} diff --git a/nonsystemd/avahi-openrc/avahi-daemon.initd b/nonsystemd/avahi-openrc/avahi-daemon.initd new file mode 100644 index 000000000..c5cd6505e --- /dev/null +++ b/nonsystemd/avahi-openrc/avahi-daemon.initd @@ -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 $? +} diff --git a/nonsystemd/avahi-openrc/avahi-dnsconfd.initd b/nonsystemd/avahi-openrc/avahi-dnsconfd.initd new file mode 100644 index 000000000..6f86c6da0 --- /dev/null +++ b/nonsystemd/avahi-openrc/avahi-dnsconfd.initd @@ -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 $? +} |