diff options
author | Chris Lumens <clumens@redhat.com> | 2009-01-07 11:55:34 -0500 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2009-01-07 11:55:34 -0500 |
commit | 130f1e6ca2b3f46166a302ca21b1df53062383be (patch) | |
tree | 3689c36759e8c6d141798d1a6a1296bdc3a5940b /upgrade.py | |
parent | 5790d261236ce648c841ef7fc62885066afc6bff (diff) | |
download | anaconda-130f1e6ca2b3f46166a302ca21b1df53062383be.tar.gz anaconda-130f1e6ca2b3f46166a302ca21b1df53062383be.tar.xz anaconda-130f1e6ca2b3f46166a302ca21b1df53062383be.zip |
Add support for specifying which partition to upgrade (atodorov, #471232).
Diffstat (limited to 'upgrade.py')
-rw-r--r-- | upgrade.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/upgrade.py b/upgrade.py index 43b66f617..d8d1e7574 100644 --- a/upgrade.py +++ b/upgrade.py @@ -128,9 +128,17 @@ def findRootParts(anaconda): if anaconda.id.rootParts is None: anaconda.id.rootParts = findExistingRoots(anaconda) + root_device = None + # ks.cfg can pass device as raw device, label or uuid. no quotes allowed + if anaconda.isKickstart and anaconda.id.ksdata.upgrade.root_device is not None: + root_device=anaconda.id.ksdata.upgrade.root_device + anaconda.id.upgradeRoot = [] for (dev, fs, meta, label, uuid) in anaconda.id.rootParts: - anaconda.id.upgradeRoot.append( (dev, fs) ) + if (root_device is not None) and ((dev == root_device) or (("UUID=%s" % uuid) == root_device) or (("LABEL=%s" % label) == root_device)): + anaconda.id.upgradeRoot.append( (dev, fs) ) + else: + anaconda.id.upgradeRoot.append( (dev, fs) ) if anaconda.id.rootParts is not None and len(anaconda.id.rootParts) > 0: anaconda.dispatch.skipStep("findinstall", skip = 0) |