[PATCH] Honor nodmraid commandline option (#499733)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 storage/formats/dmraid.py |    5 +++++
 storage/formats/mdraid.py |    6 ++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/storage/formats/dmraid.py b/storage/formats/dmraid.py
index fdbe14b..5a05b2b 100644
--- a/storage/formats/dmraid.py
+++ b/storage/formats/dmraid.py
@@ -98,5 +98,10 @@ class DMRaidMember(DeviceFormat):
 if flags.cmdline.has_key("iswmd"):
     DMRaidMember._udevTypes.remove("isw_raid_member")
 
+# The anaconda cmdline has not been parsed yet when we're first imported,
+# so we can not use flags.dmraid here
+if flags.cmdline.has_key("nodmraid"):
+    DMRaidMember._udevTypes = []
+
 register_device_format(DMRaidMember)
 
diff --git a/storage/formats/mdraid.py b/storage/formats/mdraid.py
index 47a24c1..f9df111 100644
--- a/storage/formats/mdraid.py
+++ b/storage/formats/mdraid.py
@@ -96,8 +96,10 @@ class MDRaidMember(DeviceFormat):
     def writeKS(self, f):
         f.write("raid.%s" % self.mdUuid)
 
-
-if flags.cmdline.has_key("iswmd"):
+# nodmraid -> Wether to use BIOS RAID or not
+# Note the anaconda cmdline has not been parsed yet when we're first imported,
+# so we can not use flags.dmraid here
+if flags.cmdline.has_key("iswmd") and not flags.cmdline.has_key("nodmraid"):
     MDRaidMember._udevTypes.append("isw_raid_member")
 
 register_device_format(MDRaidMember)
-- 
1.6.2.2

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

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux