[PATCH] spec: If installing default network, reload libvirtd (bz 867546)

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

 



If libvirt-daemon-config-network is installed while libvirtd is already
running, the daemon needs to be restarted to pick up the change.

Instead let's trigger a daemon reload when the package is first installed.
Then the default network is available immediately if libvirtd was already
running.

https://bugzilla.redhat.com/show_bug.cgi?id=867546
---
 libvirt.spec.in | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index e08c9e7..ada0257 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1770,6 +1770,14 @@ if test $1 -eq 1 && test ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ;
          < %{_datadir}/libvirt/networks/default.xml \
          > %{_sysconfdir}/libvirt/qemu/networks/default.xml
     ln -s ../default.xml %{_sysconfdir}/libvirt/qemu/networks/autostart/default.xml
+
+    # Make sure libvirt picks up the new network defininiton
+      %if %{with_systemd}
+    /bin/systemctl reload libvirtd.service >/dev/null 2>&1 ||:
+      %else
+    /sbin/service libvirtd reload > /dev/null 2>&1 || :
+      %endif
+
 fi
     %endif
 
-- 
2.3.5

--
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]