[rhel6] Allow /dev/disk/by-* in bootloader --driveorder (#890095)
Brian C. Lane
bcl at redhat.com
Thu Jul 11 22:56:29 UTC 2013
From: "Brian C. Lane" <bcl at redhat.com>
Dereference the bootloader --driveorder devices before trying to use
them. This allows use of any of the various ways to specify a drive.
Resolves: rhbz#890095
---
kickstart.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/kickstart.py b/kickstart.py
index 6231d38..2fd4e38 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -258,6 +258,21 @@ class AutoStep(commands.autostep.FC3_AutoStep):
flags.autoscreenshot = self.autoscreenshot
class Bootloader(commands.bootloader.RHEL6_Bootloader):
+ def parse(self, args):
+ retval = commands.bootloader.RHEL6_Bootloader.parse(self, args)
+
+ # Expand the drives in driveorder so that things like /dev/disk/by-* will work
+ drives = []
+ for drive in self.driveorder:
+ matched = deviceMatches(drive)
+ if matched:
+ drives.extend(matched)
+ else:
+ raise KickstartValueError, formatErrorMsg(self.lineno, msg="Specified nonexistent disk %s in bootloader command" % drive)
+ self.driveorder = drives
+
+ return retval
+
def execute(self, anaconda):
if self.location == "none":
location = None
--
1.8.3.1
More information about the anaconda-patches
mailing list