add updated avahi
This commit is contained in:
32
net-dns/avahi-base/files/autoipd-openrc.sh
Normal file
32
net-dns/avahi-base/files/autoipd-openrc.sh
Normal file
@@ -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/sbin/avahi-autoipd
|
||||
after interface
|
||||
}
|
||||
|
||||
autoipd_start() {
|
||||
_exists true || return 1
|
||||
|
||||
eval args=\$autoipd_${IFVAR}
|
||||
|
||||
ebegin "Starting avahi-autoipd"
|
||||
/usr/sbin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}"
|
||||
eend "${?}" || return 1
|
||||
|
||||
_show_address
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
autoipd_stop() {
|
||||
/usr/sbin/avahi-autoipd --check --syslog "${IFACE}" || return 0
|
||||
|
||||
ebegin "Stopping avahi-autoipd"
|
||||
/usr/sbin/avahi-autoipd --kill --syslog "${IFACE}"
|
||||
eend "${?}"
|
||||
}
|
||||
52
net-dns/avahi-base/files/autoipd.sh
Normal file
52
net-dns/avahi-base/files/autoipd.sh
Normal file
@@ -0,0 +1,52 @@
|
||||
# Copyright (c) 2004-2006 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# Contributed by Sven Wegener (swegener@gentoo.org)
|
||||
|
||||
# void autoipd_depend(void)
|
||||
#
|
||||
# Sets up the dependencies for the module
|
||||
autoipd_depend() {
|
||||
after interface
|
||||
}
|
||||
|
||||
# void autoipd_expose(void)
|
||||
#
|
||||
# Expose variables that can be configured
|
||||
autoipd_expose() {
|
||||
variables autoipd
|
||||
}
|
||||
|
||||
# bool autoipd_start(char *iface)
|
||||
#
|
||||
# Tries to configure the interface via avahi-autoipd
|
||||
autoipd_start() {
|
||||
local iface="${1}" ifvar="$(bash_variable "${iface}")" opts="autoipd_${ifvar}" addr=""
|
||||
|
||||
interface_exists "${iface}" true || return 1
|
||||
|
||||
ebegin "Starting avahi-autoipd"
|
||||
if /usr/sbin/avahi-autoipd --daemonize --syslog --wait ${!opts} "${iface}"
|
||||
then
|
||||
eend 0
|
||||
addr="$(interface_get_address "${iface}")"
|
||||
einfo "${iface} received address ${addr}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
eend "${?}" "Failed to get address via avahi-autoipd!"
|
||||
}
|
||||
|
||||
# bool autoipd_stop(char *iface)
|
||||
#
|
||||
# Stops a running avahi-autoipd instance
|
||||
autoipd_stop() {
|
||||
local iface="${1}"
|
||||
|
||||
/usr/sbin/avahi-autoipd --check --syslog "${iface}" || return 0
|
||||
|
||||
ebegin "Stopping avahi-autoipd"
|
||||
/usr/sbin/avahi-autoipd --kill --syslog "${iface}"
|
||||
eend "${?}" "Failed to stop running avahi-autoipd instance!"
|
||||
}
|
||||
|
||||
# vim: set ts=4 :
|
||||
@@ -0,0 +1,22 @@
|
||||
--- avahi-0.6.30/initscript/gentoo/avahi-daemon.in
|
||||
+++ avahi-0.6.30/initscript/gentoo/avahi-daemon.in
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright 1999-2007 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
-opts="reload"
|
||||
+extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
before netmount nfsmount
|
||||
--- avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in
|
||||
+++ avahi-0.6.30/initscript/gentoo/avahi-dnsconfd.in
|
||||
@@ -2,7 +2,7 @@
|
||||
# Copyright 1999-2007 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
-opts="reload"
|
||||
+extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
need avahi-daemon
|
||||
Reference in New Issue
Block a user