[libvirt] spec file: don't create networks/default.xml if it already exists
Mark McLoughlin
markmc at redhat.com
Wed Jan 21 10:29:23 UTC 2009
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 at redhat.com>
---
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
More information about the libvir-list
mailing list