[NEW PATCH] BZ#727920 restart libvirt upstart job upon libvirt upgrade (via gerrit-bot)

Dan Kenigsberg danken at redhat.com
Sat Aug 6 22:21:43 UTC 2011


New patch submitted by Dan Kenigsberg (danken at redhat.com)

You can review this change at: http://gerrit.usersys.redhat.com/787

commit 84ddfc790d725354f4036c4bdb807b79803aaa5c
Author: Dan Kenigsberg <danken at redhat.com>
Date:   Thu Aug 4 11:29:38 2011 +0300

    BZ#727920 restart libvirt upstart job upon libvirt upgrade
    
    We configure libvirt to run as an Upstart job, instead of the default
    SysV service. When libvirt is upgraded it should stop the old libvirtd
    process and start the new one, but it does so only if it is run via
    SysV.
    
    Change-Id: I8b32194ea870ef797ff98146c9746c75d183cf2b

diff --git a/vdsm.spec.in b/vdsm.spec.in
index 79a5c97..48cf960 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -151,6 +151,16 @@ if [ "$1" -ge 1 ]; then
 fi
 exit 0
 
+%triggerun -- libvirt
+if [ "$2" -eq "0" ]; then
+    /sbin/initctl stop libvirtd > /dev/null 2>&1 || :
+fi
+
+%triggerpostun -- libvirt
+if [ "$2" -ge "1" ]; then
+    /sbin/initctl restart libvirtd > /dev/null 2>&1 || :
+fi
+
 %package hook-vhostmd
 Summary: VDSM hook set for interaction with vhostmd
 Group: Applications/System




More information about the vdsm-patches mailing list