Fixed generation of UUIDs to work on upgrades

This commit is contained in:
Daniel P. Berrange
2007-03-13 03:18:52 +00:00
parent afa1d92a9f
commit 06b3f3ced3
2 changed files with 8 additions and 1 deletions

View File

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