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

 
 
LinkBack Thread Tools
 
Old 03-09-2009, 06:11 PM
Chris Lumens
 
Default Move the mdRaidBootArches logic into the platform module.

---
platform.py | 8 ++++++++
storage/__init__.py | 4 +---
storage/devicelibs/mdraid.py | 2 --
3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/platform.py b/platform.py
index 6db026e..2a765cd 100644
--- a/platform.py
+++ b/platform.py
@@ -40,6 +40,7 @@ class Platform(object):
_bootloaderPackage = None
_diskType = parted.diskType["msdos"]
_minimumSector = 0
+ _supportsMdRaidBoot = False

def __init__(self, anaconda):
"""Creates a new Platform object. This is basically an abstract class.
@@ -121,6 +122,11 @@ class Platform(object):
"""Return the default platform-specific partitioning information."""
return [("/boot", self.bootFSType, 200, None, 0, 0)]

+ @property
+ def supportsMdRaidBoot(self):
+ """Does the platform support /boot on MD RAID?"""
+ return self._supportsMdRaidBoot
+
class EFI(Platform):
_diskType = parted.diskType["gpt"]

@@ -214,6 +220,7 @@ class IA64(EFI):
class PPC(Platform):
_bootloaderPackage = "yaboot"
_ppcMachine = iutil.getPPCMachine()
+ _supportsMdRaidBoot = True

@property
def ppcMachine(self):
@@ -319,6 +326,7 @@ class Sparc(Platform):
class X86(EFI):
_bootloaderPackage = "grub"
_isEfi = iutil.isEfi()
+ _supportsMdRaidBoot = True

def __init__(self, anaconda):
EFI.__init__(self, anaconda)
diff --git a/storage/__init__.py b/storage/__init__.py
index 8dda2a4..51a892d 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -42,7 +42,6 @@ from formats import getFormat
from formats import get_device_format_class
from formats import get_default_filesystem_type
from devicelibs.lvm import safeLvmName
-from devicelibs.mdraid import mdRaidBootArches
from udev import udev_trigger
import iscsi
import zfcp
@@ -746,8 +745,7 @@ class Storage(object):
"logical volume."))

# most arches can't have boot on RAID
- if (boot and boot.type == "mdarray" and
- iutil.getArch() not in mdRaidBootArches):
+ if boot and boot.type == "mdarray" and not self.anaconda.platform.supportsMdRaidBoot:
errors.append(_("Bootable partitions cannot be on a RAID "
"device."))

diff --git a/storage/devicelibs/mdraid.py b/storage/devicelibs/mdraid.py
index 12f429f..a0d2f6a 100644
--- a/storage/devicelibs/mdraid.py
+++ b/storage/devicelibs/mdraid.py
@@ -28,8 +28,6 @@ from ..errors import *
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)

-mdRaidBootArches = ("i386", "x86_64", "ppc")
-
def getRaidLevels():
avail = []
try:
--
1.6.1.3

_______________________________________________
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 12:28 PM.

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