diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-07-23 02:47:15 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-07-23 02:47:15 +0000 |
commit | 55372716f787bd6037b5d7e6fce979b36dfc372e (patch) | |
tree | 89b7d235121d9e5ac4e100487468e7fed24698c3 /autopart.py | |
parent | d4b76de49c2f41138a253f1e1ba2940aef40cfff (diff) | |
download | anaconda-55372716f787bd6037b5d7e6fce979b36dfc372e.tar.gz anaconda-55372716f787bd6037b5d7e6fce979b36dfc372e.tar.xz anaconda-55372716f787bd6037b5d7e6fce979b36dfc372e.zip |
handling of the kickstart case where people want their partitions on a specific preexisting partition
Diffstat (limited to 'autopart.py')
-rw-r--r-- | autopart.py | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/autopart.py b/autopart.py index 579d027dd..0a0ce47c5 100644 --- a/autopart.py +++ b/autopart.py @@ -829,9 +829,34 @@ def doAutoPartition(dir, diskset, partitions, intf, instClass): drives = partitions.autoClearPartDrives for request in partitions.autoPartitionRequests: - if not request.drive: - request.drive = drives - partitions.addRequest(request) + if request.device: + # get the preexisting partition they want to use + req = partitions.getRequestByDeviceName(request.device) + if not req or not req.type or req.type != REQUEST_PREEXIST: + intf.messageWindow(_("Requested Partition Does Not Exist"), + _("Unable to locate partition %s to use " + "for %s.\n\n" + "Press OK to reboot your system.") + % (request.device, request.mountpoint)) + sys.exit(0) + + # now go through and set things from the request to the + # preexisting partition's request... ladeda + if request.mountpoint: + req.mountpoint = request.mountpoint + if request.badblocks: + req.badblocks = request.badblocks + if request.uniqueID: # for raid to work + req.uniqueID = request.uniqueID + if not request.format: + req.format = 0 + else: + req.format = 1 + req.fstype = request.fstype + else: + if not request.drive: + request.drive = drives + partitions.addRequest(request) # sanity checks for the auto partitioning requests; mostly only useful # for kickstart as our installclass defaults SHOULD be sane |