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

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

On Wed, Jan 21, 2009 at 10:29:23AM +0000, Mark McLoughlin wrote:
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
ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
participants (2)
-
Daniel P. Berrange
-
Mark McLoughlin