]> xenbits.xensource.com Git - libvirt.git/commitdiff
libvirt-guests: add reload, condrestart
authorEric Blake <eblake@redhat.com>
Tue, 27 Jul 2010 18:21:31 +0000 (12:21 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 28 Jul 2010 13:22:35 +0000 (07:22 -0600)
Optional per LSB, but required by Fedora:
https://fedoraproject.org/wiki/Packaging/SysVInitScript

* daemon/libvirt-guests.init.in (main): Add more required
commands.

daemon/libvirt-guests.init.in

index 9b3bcd7aeac2135b556bc3c16f5a3b5e05375d46..993c12d09366930df818522a56183025cb521db6 100644 (file)
@@ -303,7 +303,7 @@ rh_status() {
 # usage [val]
 # Display usage string, then exit with VAL (defaults to 2).
 usage() {
-    echo $"Usage: $0 {start|stop|status|restart|force-reload|gueststatus|shutdown}"
+    echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|gueststatus|shutdown}"
     exit ${1-2}
 }
 
@@ -321,7 +321,11 @@ case "$1" in
     restart)
         stop && start
         ;;
-    force-reload)
+    condrestart|try-restart)
+        [ -f "$VAR_SUBSYS_LIBVIRT_GUESTS" ] && stop && start
+        ;;
+    reload|force-reload)
+        # Nothing to do; we reread configuration on each invocation
         ;;
     status)
         rh_status