cli: Don't overwrite install bootorder with manual --boot (bz 1438946)

--boot should be for post-install bootorder only

https://bugzilla.redhat.com/show_bug.cgi?id=1438946
This commit is contained in:
Cole Robinson
2017-04-04 18:22:15 -04:00
parent a98b456975
commit ff3b4dc5b0
2 changed files with 4 additions and 7 deletions

View File

@@ -60,9 +60,6 @@
<os>
<type arch="x86_64">hvm</type>
<loader>/foo/bar</loader>
<boot dev="cdrom"/>
<boot dev="fd"/>
<boot dev="hd"/>
<boot dev="network"/>
<smbios mode="sysinfo"/>
<bootmenu enable="no"/>

View File

@@ -113,13 +113,13 @@ class Installer(object):
if isinstall and not self.has_install_phase():
return
bootorder = self._build_boot_order(isinstall, guest)
if not guest.os.bootorder:
bootorder = guest.os.bootorder
if isinstall or not bootorder:
# Per device <boot order> is not compatible with os/boot.
if not any(d.boot.order for d in guest.get_all_devices()):
guest.os.bootorder = bootorder
bootorder = self._build_boot_order(isinstall, guest)
guest.os.bootorder = bootorder
if not isinstall:
return