]> git.meshlink.io Git - catta/commitdiff
* Make the configure script just not install init scripts or dbus config if the distr...
authorTrent Lloyd <lathiat@bur.st>
Tue, 5 Jul 2005 15:13:15 +0000 (15:13 +0000)
committerTrent Lloyd <lathiat@bur.st>
Tue, 5 Jul 2005 15:13:15 +0000 (15:13 +0000)
* Import SUSE init script, still uses suse specific functions, we can change this later if we want

git-svn-id: file:///home/lennart/svn/public/avahi/trunk@163 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

configure.ac
initscript/Makefile.am
initscript/SUSE/Makefile.am [new file with mode: 0644]
initscript/SUSE/avahi [new file with mode: 0644]

index 4ae51729d2b4533cdbcf318e54e55d8fcc17688b..d477743769d2a3bb995522400abe9aa95ae13b8e 100644 (file)
@@ -181,11 +181,10 @@ if test "z$with_distro" = "z"; then
    exit 1
 else
 case $with_distro in
-   debian|gentoo)
+   debian|gentoo|suse)
      ;;
    *)
-     echo "Your distribution (${with_distro}) is not yet supported!  (patches welcome)"
-     exit 1
+     echo "Your distribution (${with_distro}) is not yet supported, init scripts and dbus configuration will not be installed! (patches welcome)"
      ;;
 esac
 
@@ -239,6 +238,7 @@ avahi-client/Makefile
 initscript/Makefile 
 initscript/Debian/Makefile
 initscript/Gentoo/Makefile
+initscript/SUSE/Makefile
 avahi-dnsconfd/Makefile
 ])
 AC_OUTPUT
index b20408a1eb67071a9da851f4c2feecc3d99ffa56..ea26a623c46419302c4943fbc2b8192a97a5d146 100644 (file)
@@ -1,16 +1,10 @@
 SUBDIRS = 
-if TARGET_REDHAT
-SUBDIRS += RedHat
-endif
 if TARGET_GENTOO
 SUBDIRS += Gentoo
 endif
 if TARGET_DEBIAN
 SUBDIRS += Debian
 endif
-if TARGET_SLACKWARE
-SUBDIRS += Slackware
-endif
 if TARGET_SUSE
 SUBDIRS += SUSE
 endif
diff --git a/initscript/SUSE/Makefile.am b/initscript/SUSE/Makefile.am
new file mode 100644 (file)
index 0000000..7e9abf5
--- /dev/null
@@ -0,0 +1,4 @@
+dbusinitddir = $(sysconfdir)/init.d
+dbusinitd_SCRIPTS = avahi
+
+EXTRA_DIST = $(dbusinitd_SCRIPTS)
diff --git a/initscript/SUSE/avahi b/initscript/SUSE/avahi
new file mode 100644 (file)
index 0000000..bd0cba1
--- /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=/usr/bin/avahi
+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
+