Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian Kernel (http://www.linux-archive.org/debian-kernel/)
-   -   Clean up BootLoader.writeKS to account for no bootloader. (http://www.linux-archive.org/debian-kernel/607179-clean-up-bootloader-writeks-account-no-bootloader.html)

David Lehman 12-06-2011 06:43 PM

Clean up BootLoader.writeKS to account for no bootloader.
 
---
pyanaconda/bootloader.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index 1150335..b08c6cd 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -988,20 +988,20 @@ class BootLoader(object):

def writeKS(self, f):
""" Write bootloader section of kickstart configuration. """
- if self.stage1_device.isDisk:
+ if not self.stage1_device:
+ location = "none
"
+ elif self.stage1_device.isDisk:
location = "mbr"
- elif self.stage1_device:
- location = "partition"
else:
- location = "none
"
+ location = "partition"

f.write("bootloader --location=%s" % location)
- if self.timeout is not None:
- f.write(" --timeout=%d" % self.timeout)
-
if not self.stage1_device:
return

+ if self.timeout is not None:
+ f.write(" --timeout=%d" % self.timeout)
+
if self.drive_order:
f.write(" --driveorder=%s" % ",".join(self.drive_order))

--
1.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 04:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.