[libvirt] spec file: don't create networks/default.xml if it already exists

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

 



If you un-install libvirt and re-install it, you get a warning
from the post-install script:

  Installing     : libvirt
  ln: creating symbolic link `/etc/libvirt/qemu/networks/autostart/default.xml': File exists

See https://bugzilla.redhat.com/462011

Signed-off-by: Mark McLoughlin <markmc@xxxxxxxxxx>
---
 libvirt.spec.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index e0ce497..9121c6d 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -294,7 +294,7 @@ rm -fr %{buildroot}
 # or on the first upgrade from a non-network aware libvirt only.
 # We check this by looking to see if the daemon is already installed
 /sbin/chkconfig --list libvirtd 1>/dev/null 2>&1
-if [ $? != 0 ]
+if [ $? != 0 -a ! -f %{_sysconfdir}/libvirt/qemu/networks/default.xml ]
 then
     UUID=`/usr/bin/uuidgen`
     sed -e "s,</name>,</name>\n  <uuid>$UUID</uuid>," \
-- 
1.6.0.6

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