# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
+if HAVE_PYTHON
avahidir = $(pythondir)/avahi
-if HAVE_PYTHON
avahi_PYTHON = __init__.py SimpleGladeApp.py
endif
-dbusinitddir = $(sysconfdir)/init.d
-dbusinitd_SCRIPTS = avahi-daemon avahi-dnsconfd
+# $Id$
-EXTRA_DIST = $(dbusinitd_SCRIPTS)
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+initddir = $(sysconfdir)/init.d
+
+EXTRA_DIST = \
+ avahi-daemon.in \
+ avahi-dnsconfd.in
+
+initd_SCRIPTS = \
+ avahi-daemon \
+ avahi-dnsconfd
+
+CLEANFILES = \
+ avahi-daemon \
+ avahi-dnsconfd
+
+avahi-daemon: avahi-daemon.in
+ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ chmod +x $@
+
+avahi-dnsconfd: avahi-dnsconfd.in
+ sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ chmod +x $@
+++ /dev/null
-#!/sbin/runscript
-# Avahi ZeroConf Daemon init script
-# Many thanks to the Avahi developer's and Sebastien Estienne
-# Author: Steev Klimaszewski <steev@steev.net>
-
-DAEMON=/usr/bin/avahi-daemon
-
-depend () {
- need net
- use dbus
-}
-
-start() {
- ebegin "Starting avahi"
- $DAEMON -D
- eend $?
-}
-
-stop() {
- ebegin "Stopping avahi"
- $DAEMON -k || /bin/true
- eend $?
-}
-
-reload() {
- ebegin "Reloading avahi configuration"
- $DAEMON -r
- eend $?
-}
-
--- /dev/null
+#!/sbin/runscript
+# $Id$
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/www.gentoo.org/raw_cvs/gentoo-x86/net-dns/avahi/files/avahi.initd,v 1.2 2005/08/22 03:47:19 swegener Exp $
+
+opts="${opts} reload"
+
+depend() {
+ use net dbus
+}
+
+start() {
+ ebegin "Starting avahi-daemon"
+ @sbindir@/avahi-daemon -D
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping avahi-daemon"
+ @sbindir@/avahi-daemon -k
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading avahi-daemon"
+ @sbindir@/avahi-daemon -r
+ eend $?
+}
+++ /dev/null
-#! /bin/sh
-#
-# avahi-dnsconfd avahi dns configuration daemon
-# Daemon for ZeroConf
-#
-# Author: Steev Klimaszewski <steev@steev.net>
-
-DAEMON=/usr/bin/avahi-dnsconfd
-
-depend () {
- need net
- after avahi-daemon
-}
-
-start() {
- ebegin "Starting avahi-dnsconfd"
- $DAEMON -D
- eend $?
-}
-
-stop() {
- ebegin "Stopping avahi-dnsconfd"
- $DAEMON -k || /bin/true
- eend $?
-}
-
-reload() {
- ebegin "Reloading avahi-dnsconfd"
- $DAEMON -r
- eend $?
-}
--- /dev/null
+#!/sbin/runscript
+# $Id$
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/www/www.gentoo.org/raw_cvs/gentoo-x86/net-dns/avahi/files/avahi-dnsconfd.initd,v 1.1 2005/08/22 03:47:19 swegener Exp $
+
+opts="${opts} reload"
+
+depend() {
+ need avahi-daemon
+ use net
+}
+
+start() {
+ ebegin "Starting avahi-dnsconfd"
+ @sbindir@/avahi-dnsconfd -D
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping avahi-dnsconfd"
+ @sbindir@/avahi-dnsconfd -k
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading avahi-dnsconfd"
+ @sbindir@/avahi-dnsconfd -r
+ eend $?
+}