mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
Fixed generation of UUIDs to work on upgrades
This commit is contained in:
parent
afa1d92a9f
commit
06b3f3ced3
@ -1,3 +1,9 @@
|
||||
Mon Mar 12 23:17:11 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* libvirt.spec.in: Don't run UUID generation on first install,
|
||||
instead run it if there is no <uuid> in the default network.
|
||||
This ensures RPM upgrades get a UUID inserted
|
||||
|
||||
Mon Mar 12 12:32:11 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||
|
||||
* libvirt.spec.in: Generate a random UUID for the default network
|
||||
|
@ -84,7 +84,8 @@ rm -fr %{buildroot}
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
/sbin/chkconfig --add libvirtd
|
||||
if [ $1 = 1 ]; then
|
||||
grep uuid %{_sysconfdir}/libvirt/qemu/networks/default.xml 1>/dev/null 2>&1
|
||||
if [ $? != 0 ]; then
|
||||
UUID=`/usr/bin/uuidgen`
|
||||
sed -i -e "s,</name>,</name>\n <uuid>$UUID</uuid>," %{_sysconfdir}/libvirt/qemu/networks/default.xml
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user