[PATCH 3/3] libvirt-guests: add reload, condrestart

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/daemon/libvirt-guests.init.in b/daemon/libvirt-guests.init.in
index 953b18a..960856c 100644
--- a/daemon/libvirt-guests.init.in
+++ b/daemon/libvirt-guests.init.in
@@ -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
-- 
1.7.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]