[PATCH 5/5] Raise an error if bootDrive is invalid
Jesse Keating
jkeating at redhat.com
Mon Sep 24 22:47:29 UTC 2012
---
pyanaconda/kickstart.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
index fff0ff2..57b26f1 100644
--- a/pyanaconda/kickstart.py
+++ b/pyanaconda/kickstart.py
@@ -311,7 +311,11 @@ class Bootloader(commands.bootloader.F18_Bootloader):
storage.bootloader.disk_order = self.driveorder
- if not self.bootDrive:
+ if self.bootDrive:
+ if not self.bootDrive in disk_names:
+ raise KickstartValueError, formatErrorMsg(self.lineno,
+ msg="Requested boot drive %s doesn't exist" % self.bootDrive)
+ else:
self.bootDrive = disk_names[0]
spec = udev_resolve_devspec(self.bootDrive)
--
1.7.11.4
More information about the anaconda-patches
mailing list