#
# 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, slackware or none]))
+AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the distribution to target: One of lfs, debian, gentoo, archlinux, fedora, mandriva, darwin, netbsd, freebsd, slackware or none]))
if test "z$with_distro" = "z"; then
if test "$cross_compiling" = yes; then
AC_MSG_WARN([Target distribution cannot be reliably detected when cross-compiling. You should specify it with --with-distro (see $0 --help for recognized distros)])
else
+ AC_CHECK_FILE(/etc/lfs-release,with_distro="lfs")
AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
AC_CHECK_FILE(/etc/arch-release,with_distro="archlinux")
with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
case $with_distro in
- debian|gentoo|archlinux|suse|fedora|mandriva|darwin|freebsd|slackware|none)
+ lfs|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)])
;;
esac
+AM_CONDITIONAL(TARGET_LFS, test x"$with_distro" = xlfs)
AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
initscript/archlinux/Makefile
initscript/suse/Makefile
initscript/fedora/Makefile
+initscript/lfs/Makefile
initscript/mandriva/Makefile
initscript/darwin/Makefile
initscript/freebsd/Makefile
--- /dev/null
+# $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/init.d
+
+EXTRA_DIST = avahi.in
+
+initd_SCRIPTS = avahi
+
+CLEANFILES = avahi
+
+avahi: avahi.in
+ chmod +x $@
--- /dev/null
+#!/bin/sh
+########################################################################
+# Begin $rc_base/init.d/avahi
+#
+# Description : Avahi daemon loader
+#
+# Authors : William Immendorf - will.immendorf@gmail.com
+#
+# Version : 00.00
+#
+# Notes : Based off of the LFS 6.4 sysklogd script.
+#
+########################################################################
+
+. /etc/sysconfig/rc
+. ${rc_functions}
+
+case "${1}" in
+ start)
+ boot_mesg "Starting the Avahi daemon..."
+ loadproc avahi-daemon -D
+ ;;
+
+ stop)
+ boot_mesg "Stopping the Avahi daemon..."
+ avahi-daemon -k
+ evaluate_retval
+ ;;
+
+ reload)
+ boot_mesg "Reloading the Avahi daemon..."
+ reloadproc avahi-daemon -r
+ ;;
+ restart)
+ ${0} stop
+ sleep 1
+ ${0} start
+ ;;
+
+ status)
+ statusproc avahi-daemon
+ ;;
+ *)
+ echo "Usage: ${0} {start|stop|reload|restart|status}"
+ exit 1
+ ;;
+esac
+
+# End $rc_base/init.d/avahi