FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-10-2009, 04:31 PM
David Lehman
 
Default Tighten restrictions on the type of disklabel on x86 and EFI boot disks.

---
platform.py | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/platform.py b/platform.py
index 8d15da6..8599f72 100644
--- a/platform.py
+++ b/platform.py
@@ -211,6 +211,13 @@ class EFI(Platform):
return ret

def checkBootRequest(self, req):
+ """ Perform architecture-specific checks on the boot device.
+
+ Returns a list of error strings.
+
+ NOTE: X86 does not have a separate checkBootRequest method,
+ so this one must work for x86 as well as EFI.
+ """
if not req:
return [_("You have not created a /boot/efi partition.")]

@@ -223,8 +230,10 @@ class EFI(Platform):
disk = req.disk.format.partedDisk

# Check that we've got a correct disk label.
- if not disk.type in ["gpt", "msdos"]:
- errors.append(_("%s must have a GPT or MSDOS disk label.") % req.disk.name)
+ labelType = self.diskLabelType(disk.device.type)
+ if disk.type != labelType:
+ errors.append(_("%s must have a %s disk label.")
+ % (req.disk.name, labelType.upper())

return errors

--
1.6.5.2

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

Thread Tools




All times are GMT. The time now is 10:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org