From 6580b8389158f1bb43771f118583c48b1e2035e1 Mon Sep 17 00:00:00 2001 From: Trent Lloyd Date: Tue, 23 Aug 2005 11:28:40 +0000 Subject: * New gentoo init scripts from Sven Wegener * Fix creation of /avahi when compiling without python (thanks Sven Wegener for that too) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@413 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-utils/avahi/Makefile.am | 2 +- initscript/gentoo/Makefile.am | 42 ++++++++++++++++++++++++++++++++++--- initscript/gentoo/avahi-daemon | 30 -------------------------- initscript/gentoo/avahi-daemon.in | 29 +++++++++++++++++++++++++ initscript/gentoo/avahi-dnsconfd | 31 --------------------------- initscript/gentoo/avahi-dnsconfd.in | 30 ++++++++++++++++++++++++++ 6 files changed, 99 insertions(+), 65 deletions(-) delete mode 100644 initscript/gentoo/avahi-daemon create mode 100644 initscript/gentoo/avahi-daemon.in delete mode 100644 initscript/gentoo/avahi-dnsconfd create mode 100644 initscript/gentoo/avahi-dnsconfd.in diff --git a/avahi-utils/avahi/Makefile.am b/avahi-utils/avahi/Makefile.am index 5ea7a6a..68c7147 100644 --- a/avahi-utils/avahi/Makefile.am +++ b/avahi-utils/avahi/Makefile.am @@ -17,9 +17,9 @@ # 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 diff --git a/initscript/gentoo/Makefile.am b/initscript/gentoo/Makefile.am index 6e69bb2..4165ad3 100644 --- a/initscript/gentoo/Makefile.am +++ b/initscript/gentoo/Makefile.am @@ -1,4 +1,40 @@ -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 $@ diff --git a/initscript/gentoo/avahi-daemon b/initscript/gentoo/avahi-daemon deleted file mode 100644 index 8b3a359..0000000 --- a/initscript/gentoo/avahi-daemon +++ /dev/null @@ -1,30 +0,0 @@ -#!/sbin/runscript -# Avahi ZeroConf Daemon init script -# Many thanks to the Avahi developer's and Sebastien Estienne -# Author: Steev Klimaszewski - -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 $? -} - diff --git a/initscript/gentoo/avahi-daemon.in b/initscript/gentoo/avahi-daemon.in new file mode 100644 index 0000000..a4b25db --- /dev/null +++ b/initscript/gentoo/avahi-daemon.in @@ -0,0 +1,29 @@ +#!/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 $? +} diff --git a/initscript/gentoo/avahi-dnsconfd b/initscript/gentoo/avahi-dnsconfd deleted file mode 100644 index 85ad78e..0000000 --- a/initscript/gentoo/avahi-dnsconfd +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -# -# avahi-dnsconfd avahi dns configuration daemon -# Daemon for ZeroConf -# -# Author: Steev Klimaszewski - -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 $? -} diff --git a/initscript/gentoo/avahi-dnsconfd.in b/initscript/gentoo/avahi-dnsconfd.in new file mode 100644 index 0000000..98556e8 --- /dev/null +++ b/initscript/gentoo/avahi-dnsconfd.in @@ -0,0 +1,30 @@ +#!/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 $? +} -- cgit