--- initscript/suse/avahi-daemon.in +++ initscript/suse/avahi-daemon.in @@ -1,9 +1,10 @@ #! /bin/sh ### BEGIN INIT INFO # Provides: avahi -# Required-Start: $network dbus +# Required-Start: $network $remote_fs dbus # Default-Start: 3 5 # Default-Stop: +# Short-Description: ZeroConf daemon # Description: Avahi, a ZeroConf daemon for mDNS and service registration ### END INIT INFO @@ -33,6 +34,18 @@ $AVAHI_BIN -k || /bin/true rc_status -v ;; + 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 + ;; restart) $0 stop $0 start @@ -49,7 +62,7 @@ rc_status -v ;; *) - echo "Usage: $0 {start|stop|status|restart|force-reload|reload}" + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" exit 1 ;; esac --- initscript/suse/avahi-dnsconfd.in +++ initscript/suse/avahi-dnsconfd.in @@ -1,9 +1,10 @@ #! /bin/sh ### BEGIN INIT INFO # Provides: avahi-dnsconfd -# Required-Start: avahi +# Required-Start: $remote_fs avahi # Default-Start: 3 5 # Default-Stop: +# Short-Description: ZeroConf daemon # Description: Avahi, a ZeroConf daemon for mDNS and service registration ### END INIT INFO @@ -24,6 +25,18 @@ $AVAHI_BIN -k || /bin/true rc_status -v ;; + 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 + ;; restart) $0 stop $0 start @@ -40,7 +53,7 @@ rc_status -v ;; *) - echo "Usage: $0 {start|stop|status|restart|force-reload|reload}" + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}" exit 1 ;; esac