]> git.meshlink.io Git - catta/commitdiff
init: update the suse initscripts
authorVincent Untz <vuntz@gnome.org>
Mon, 20 Sep 2010 01:33:08 +0000 (03:33 +0200)
committerLennart Poettering <lennart@poettering.net>
Sun, 24 Oct 2010 13:52:22 +0000 (15:52 +0200)
Here are two patches for avahi. The avahi website is extremly slow
today, so I didn't file them.

 - avahi-fix-howl.pc.patch: fix a small issue introduced in
   c8eacc0f13f6df529f2f40961e2ddb3a45dc9f93
 - avahi-init-lsb.patch: update the suse initscripts, with a patch
   we've had for a while

Cheers,

Vincent

--
Les gens heureux ne sont pas pressés.

initscript/suse/avahi-daemon.in
initscript/suse/avahi-dnsconfd.in

index 851006cf722480fba03398ea8d532f424ff74ce2..0dc5f9fb5c1e74ec862d6f07f4a6722e124f9498 100644 (file)
@@ -2,6 +2,7 @@
 ### BEGIN INIT INFO
 # Provides:          avahi
 # Required-Start:    $network $remote_fs dbus
+# Required-Stop:     $network $remote_fs dbus
 # Default-Start:     3 5
 # Default-Stop:
 # Short-Description: ZeroConf daemon
@@ -25,6 +26,18 @@ case "$1" in
                $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 +54,7 @@ case "$1" in
                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
index e633b8d16cd168bab3a228fb47473966c6c73b2e..51100e36ac1d3f279b8e858c63ac06407e16ccd5 100644 (file)
@@ -2,6 +2,7 @@
 ### BEGIN INIT INFO
 # Provides:          avahi-dnsconfd
 # Required-Start:    $remote_fs avahi
+# Required-Stop:     $remote_fs avahi
 # Default-Start:     3 5
 # Default-Stop:
 # Short-Description: ZeroConf daemon
@@ -30,6 +31,18 @@ case "$1" in
                $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 +54,7 @@ case "$1" in
                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