From 38c9b2e0fef63e281164d39bfc3a99e7eca2dfa6 Mon Sep 17 00:00:00 2001 From: Sebastien Estienne Date: Mon, 13 Feb 2006 08:07:45 +0000 Subject: [PATCH] * Updated doc/TODO * Welcome onboard to slackware thanx to Diffie (Paul Blazejowski) git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1134 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- configure.ac | 7 ++- docs/TODO | 2 +- initscript/Makefile.am | 4 ++ initscript/slackware/Makefile.am | 34 +++++++++++ initscript/slackware/avahi-daemon.in | 80 ++++++++++++++++++++++++++ initscript/slackware/avahi-dnsconfd.in | 80 ++++++++++++++++++++++++++ 6 files changed, 204 insertions(+), 3 deletions(-) create mode 100644 initscript/slackware/Makefile.am create mode 100644 initscript/slackware/avahi-daemon.in create mode 100644 initscript/slackware/avahi-dnsconfd.in diff --git a/configure.ac b/configure.ac index be7c378..900dd96 100644 --- a/configure.ac +++ b/configure.ac @@ -115,7 +115,7 @@ AC_TRY_COMPILE([#include ], [ # # Detecting the linux distribution for specific things like init scripts. # -AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of debian, gentoo, archlinux, fedora, mandriva, darwin, netbsd, freebsd or none])) +AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of debian, gentoo, archlinux, fedora, mandriva, darwin, netbsd, freebsd, slackware or none])) if test "z$with_distro" = "z"; then AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse") AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo") @@ -123,6 +123,7 @@ if test "z$with_distro" = "z"; then AC_CHECK_FILE(/etc/debian_version,with_distro="debian") AC_CHECK_FILE(/etc/redhat-release,with_distro="fedora") AC_CHECK_FILE(/etc/mandriva-release,with_distro="mandriva") + AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware") if test "z$with_distro" = "z"; then with_distro=`uname -s` fi @@ -130,7 +131,7 @@ fi with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' ` case $with_distro in - debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|none) + debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|slackware|none) ;; netbsd) AC_MSG_WARN([Your distribution (${with_distro}) is supported but no init script exist yet! (patches welcome)]) @@ -152,6 +153,7 @@ AM_CONDITIONAL(TARGET_MANDRIVA, test x"$with_distro" = xmandriva) AM_CONDITIONAL(TARGET_DARWIN, test x"$with_distro" = xdarwin) AM_CONDITIONAL(TARGET_NETBSD, test x"$with_distro" = xnetbsd) AM_CONDITIONAL(TARGET_FREEBSD, test x"$with_distro" = xfreebsd) +AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware) test_gcc_flag() { AC_LANG_CONFTEST([int main() {}]) @@ -755,6 +757,7 @@ initscript/fedora/Makefile initscript/mandriva/Makefile initscript/darwin/Makefile initscript/freebsd/Makefile +initscript/slackware/Makefile avahi-dnsconfd/Makefile avahi-utils/Makefile avahi-python/Makefile diff --git a/docs/TODO b/docs/TODO index 55f1aad..9907ec6 100644 --- a/docs/TODO +++ b/docs/TODO @@ -10,7 +10,6 @@ later: * libavahi-compat-libdns_sd: implement kDNSServiceFlagsNoAutoRename and missing functions * libavahi-compat-howl: implement missing functions * add API to allow user to tell the server that some service is not reachable -* Add static host configuration like static services [lathiat] done: * drop glib from avahi-daemon @@ -104,3 +103,4 @@ done: * fix python scripts * Expose AvahiSRecordBrowser over D-BUS and implement in avahi-client * avahi-publish-* rewrites in C, update man pages +* Add static host configuration like static services [lathiat] diff --git a/initscript/Makefile.am b/initscript/Makefile.am index dbce3a2..7fcd15f 100644 --- a/initscript/Makefile.am +++ b/initscript/Makefile.am @@ -50,3 +50,7 @@ endif if TARGET_FREEBSD SUBDIRS += freebsd endif + +if TARGET_SLACKWARE +SUBDIRS += slackware +endif diff --git a/initscript/slackware/Makefile.am b/initscript/slackware/Makefile.am new file mode 100644 index 0000000..5763f7a --- /dev/null +++ b/initscript/slackware/Makefile.am @@ -0,0 +1,34 @@ +# $Id$ + +# 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)/rc.d + +EXTRA_DIST = avahi-daemon.in avahi-dnsconfd.in + +initd_SCRIPTS = rc.avahidaemon rc.avahidnsconfd + +CLEANFILES = avahi-daemon avahi-dnsconfd + +rc.avahidaemon: avahi-daemon.in + sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + chmod +x $@ + +rc.avahidnsconfd: avahi-dnsconfd.in + sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ + chmod +x $@ diff --git a/initscript/slackware/avahi-daemon.in b/initscript/slackware/avahi-daemon.in new file mode 100644 index 0000000..acd377d --- /dev/null +++ b/initscript/slackware/avahi-daemon.in @@ -0,0 +1,80 @@ +#!/bin/bash + +# $Id$ + +# 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. + +# Start/stop/restart the avahi daemon: + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DESC="Avahi mDNS/DNS-SD Daemon" +NAME="avahi-daemon" +DAEMON="@sbindir@/$NAME" + +avahid_start() +{ + echo "Starting $DESC: $DAEMON -D" + $DAEMON -D +} + +avahid_status() +{ + $DAEMON -c + [ $? = 0 ] +} + +avahid_stop() +{ + echo -en "Stopping $DESC: " + $DAEMON -c + [ $? != 0 ] + echo "stopped"; + $DAEMON -k 2>/dev/null +} + +avahid_restart() +{ + avahid_stop + avahid_start +} + +case "$1" in +'start') + if ( ! avahid_status ); then + avahid_start + else + echo "$DESC is already running (will not start it twice)." + fi + ;; +'stop') + avahid_stop + ;; +'restart') + avahid_restart + ;; +'status') + if ( avahid_status ); then + echo "$DESC is currently running" + else + echo "$DESC is not running." + fi + ;; +*) + echo "usage $0 start|stop|status|restart" +esac + diff --git a/initscript/slackware/avahi-dnsconfd.in b/initscript/slackware/avahi-dnsconfd.in new file mode 100644 index 0000000..4da14fa --- /dev/null +++ b/initscript/slackware/avahi-dnsconfd.in @@ -0,0 +1,80 @@ +#!/bin/bash + +# $Id$ + +# 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. + +# Start/stop/restart the avahi dnsconfd daemon: + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DESC="Avahi mDNS/DNS-SD DNS Server Configuration Daemon" +NAME="avahi-dnsconfd" +DAEMON="@sbindir@/$NAME" + +avahidns_start() +{ + echo "Starting $DESC: $DAEMON -D" + $DAEMON -D +} + +avahidns_status() +{ + $DAEMON -c + [ $? = 0 ] +} + +avahidns_stop() +{ + echo -en "Stopping $DESC: " + $DAEMON -c + [ $? != 0 ] + echo "stopped"; + $DAEMON -k 2>/dev/null +} + +avahidns_restart() +{ + avahidns_stop + avahidns_start +} + +case "$1" in +'start') + if ( ! avahidns_status ); then + avahidns_start + else + echo "$DESC is already running (will not start it twice)." + fi + ;; +'stop') + avahidns_stop + ;; +'restart') + avahidns_restart + ;; +'status') + if ( avahidns_status ); then + echo "$DESC is currently running" + else + echo "$DESC is not running." + fi + ;; +*) + echo "usage $0 start|stop|status|restart" +esac + -- 2.39.5