]> git.meshlink.io Git - catta/blobdiff - initscript/suse/avahi-dnsconfd.in
fix avahi_netlink_new to allow multiple netlinks per process
[catta] / initscript / suse / avahi-dnsconfd.in
index b9de80867c9b850ea004dcf1db62e0bd80677e6d..b88660ba77497bd8a777ad794040669ee929808f 100644 (file)
@@ -1,10 +1,12 @@
 #! /bin/sh
 ### BEGIN INIT INFO
-# Provides:       avahi-dnsconfd
-# Required-Start: avahi
-# Default-Start:  3 5
+# Provides:          avahi-dnsconfd
+# Required-Start:    $remote_fs avahi
+# Required-Stop:     $remote_fs avahi
+# Default-Start:     3 5
 # Default-Stop:
-# Description: Avahi, a ZeroConf daemon for mDNS and service registration
+# Short-Description: ZeroConf daemon
+# Description:       Avahi, a ZeroConf daemon for mDNS and service registration
 ### END INIT INFO
 
 AVAHI_BIN=@sbindir@/avahi-dnsconfd
@@ -14,34 +16,45 @@ test -x $AVAHI_BIN || exit 5
 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
-        ;;
+       start)
+               echo -n "Starting Avahi DNS Configuration daemon "
+               $AVAHI_BIN -D
+               rc_status -v
+               ;;
+       stop)
+               echo -n "Shutting down Avahi DNS Configuration daemon "
+               $AVAHI_BIN -k 2>/dev/null || /bin/true
+               rc_status -v
+               ;;
+       restart)
+               $0 stop
+               $0 start
+               rc_status
+               ;;
+       try-restart|condrestart)
+               if test "$1" = "condrestart"; then
+                       echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
+               fi
+               $0 status
+               if test $? = 0; then
+                       $0 restart
+               else
+                       rc_reset
+               fi
+               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=3
+               rc_status -v
+               ;;
+       *)
+               echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
+               exit 1
+               ;;
 esac
-