]> git.meshlink.io Git - catta/commitdiff
add suse init scripts
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Sep 2005 21:16:20 +0000 (21:16 +0000)
committerLennart Poettering <lennart@poettering.net>
Wed, 7 Sep 2005 21:16:20 +0000 (21:16 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@527 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

configure.ac
initscript/Makefile.am
initscript/suse/Makefile.am
initscript/suse/avahi-daemon [deleted file]
initscript/suse/avahi-daemon.in [new file with mode: 0644]
initscript/suse/avahi-dnsconfd.in [new file with mode: 0644]

index c9de6ae8bd5cbd1767183d35661f791b654f09ab..4224712e1dcab8c06e947ed60159e42ace6780db 100644 (file)
@@ -58,7 +58,7 @@ AC_PROG_LIBTOOL
 #
 AC_ARG_WITH(distro, AS_HELP_STRING([--with-distro=DISTRO],[Specify the Linux distribution to target: One of debian, gentoo, archlinux or none]))
 if test "z$with_distro" = "z"; then
-    #AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
+    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")
     AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
@@ -70,7 +70,7 @@ if test "z$with_distro" = "z"; then
     exit 1
 else
 case $with_distro in
-    debian|gentoo|archlinux|none)
+    debian|gentoo|archlinux|suse|none)
      ;;
     *)
      AC_MSG_ERROR([Your distribution (${with_distro}) is not yet supported, init scripts and dbus configuration will not be installed! (patches welcome), you can specify --with-distro=none to skip this check])
@@ -78,7 +78,7 @@ case $with_distro in
 esac
 fi
 
-#AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
+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)
 AM_CONDITIONAL(TARGET_ARCHLINUX, test x"$with_distro" = xarchlinux)
@@ -471,6 +471,7 @@ initscript/Makefile
 initscript/debian/Makefile
 initscript/gentoo/Makefile
 initscript/archlinux/Makefile
+initscript/suse/Makefile
 avahi-dnsconfd/Makefile
 avahi-utils/Makefile
 avahi-utils/avahi/Makefile
index 16bbbf046fdd94edc5090b42ec768b19dbf5db03..12ed429b0ed0522acacf6831bdefb39afa038786 100644 (file)
@@ -31,8 +31,6 @@ if TARGET_GENTOO
 SUBDIRS += gentoo
 endif
 
-# We disable shipping of these init scripts for now as they are out of date
-
-#if TARGET_SUSE
-#SUBDIRS += suse
-#endif
+if TARGET_SUSE
+SUBDIRS += suse
+endif
index 3aa8431e29572f719ac0ad443f0f9cbb08fbad13..e18f0f6bfd54681e5bc2a73b123e752560727937 100644 (file)
@@ -1,6 +1,34 @@
-if ENABLE_DBUS
-dbusinitddir = $(sysconfdir)/init.d
-dbusinitd_SCRIPTS = avahi-daemon
+# $Id$
 
-EXTRA_DIST = $(dbusinitd_SCRIPTS)
-endif
+# 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/suse/avahi-daemon b/initscript/suse/avahi-daemon
deleted file mode 100644 (file)
index 59bd0c9..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#! /bin/sh
-### BEGIN INIT INFO
-# Provides:       avahi
-# Required-Start: $network dbus
-# Default-Start:  3 5
-# Default-Stop:
-# Description: Avahi, a ZeroConf daemon for mDNS and service registration
-### END INIT INFO
-
-AVAHI_BIN=/usr/bin/avahi-daemon
-test -x $AVAHI_BIN || exit 5
-
-. /etc/rc.status
-rc_reset
-
-case "$1" in
-    start)
-        echo -n "Starting Avahi daemon"
-        startproc $AVAHI_BIN -D
-       rc_status -v
-        ;;
-    stop)
-        echo -n "Shutting down Avahi daemon"
-        killproc -TERM $AVAHI_BIN
-       rc_status -v
-        ;;
-    restart)
-        $0 stop
-        $0 start
-       rc_status
-        ;;
-    force-reload|reload)
-        echo -n "Reloading Avahi daemon"
-        killproc -HUP $AVAHI_BIN
-       rc_status -v
-        ;;
-    status)
-        echo -n "Checking for Avahi daemon: "
-        checkproc $AVAHI_BIN
-        rc_status -v
-        ;;
-    *)
-        echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
-        exit 1
-        ;;
-esac
-
diff --git a/initscript/suse/avahi-daemon.in b/initscript/suse/avahi-daemon.in
new file mode 100644 (file)
index 0000000..1625464
--- /dev/null
@@ -0,0 +1,47 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:       avahi
+# Required-Start: $network dbus
+# Default-Start:  3 5
+# Default-Stop:
+# Description: Avahi, a ZeroConf daemon for mDNS and service registration
+### END INIT INFO
+
+AVAHI_BIN=@sbindir@/avahi-daemon
+test -x $AVAHI_BIN || exit 5
+
+. /etc/rc.status
+rc_reset
+
+case "$1" in
+    start)
+        echo -n "Starting Avahi daemon"
+        /sbin/startproc $AVAHI_BIN -D
+       rc_status -v
+        ;;
+    stop)
+        echo -n "Shutting down Avahi daemon"
+        $AVAHI_BIN -k || /bin/true
+       rc_status -v
+        ;;
+    restart)
+        $0 stop
+        $0 start
+       rc_status
+        ;;
+    force-reload|reload)
+        echo -n "Reloading Avahi daemon"
+        $AVAHI_BIN -r
+       rc_status -v
+        ;;
+    status)
+        echo -n "Checking for Avahi daemon: "
+        $AVAHI_BIN -c
+        rc_status -v
+        ;;
+    *)
+        echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
+        exit 1
+        ;;
+esac
+
diff --git a/initscript/suse/avahi-dnsconfd.in b/initscript/suse/avahi-dnsconfd.in
new file mode 100644 (file)
index 0000000..b9de808
--- /dev/null
@@ -0,0 +1,47 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides:       avahi-dnsconfd
+# Required-Start: avahi
+# Default-Start:  3 5
+# Default-Stop:
+# Description: Avahi, a ZeroConf daemon for mDNS and service registration
+### END INIT INFO
+
+AVAHI_BIN=@sbindir@/avahi-dnsconfd
+test -x $AVAHI_BIN || exit 5
+
+. /etc/rc.status
+rc_reset
+
+case "$1" in
+    start)
+        echo -n "Starting Avahi DNS Configuration daemon"
+        /sbin/startproc $AVAHI_BIN -D
+       rc_status -v
+        ;;
+    stop)
+        echo -n "Shutting down Avahi DNS Configuration daemon"
+        $AVAHI_BIN -k || /bin/true
+       rc_status -v
+        ;;
+    restart)
+        $0 stop
+        $0 start
+       rc_status
+        ;;
+    force-reload|reload)
+        echo -n "Reloading Avahi DNS Configuration daemon"
+        $AVAHI_BIN -r
+       rc_status -v
+        ;;
+    status)
+        echo -n "Checking for Avahi DNS Configuration daemon: "
+        $AVAHI_BIN -c
+        rc_status -v
+        ;;
+    *)
+        echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
+        exit 1
+        ;;
+esac
+