--- initscript/suse/avahi-daemon.in +++ initscript/suse/avahi-daemon.in @@ -25,6 +25,18 @@ $AVAHI_BIN -k 2>/dev/null || /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 @@ -41,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 --- initscript/suse/avahi-dnsconfd.in +++ initscript/suse/avahi-dnsconfd.in @@ -30,6 +30,18 @@ $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 @@ -41,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