summaryrefslogtreecommitdiffstats
path: root/upgrade.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2008-08-13 20:55:52 -0500
committerDavid Lehman <dlehman@redhat.com>2008-08-13 20:57:11 -0500
commitfb7ad6522879d0482444df3007609d57d3d6ad90 (patch)
tree343c28b2f3591425adf6ea0de7aab6f4ac9f4411 /upgrade.py
parent430d1b25575c66790fa7b5b1e54833c36441d2a3 (diff)
downloadanaconda-fb7ad6522879d0482444df3007609d57d3d6ad90.tar.gz
anaconda-fb7ad6522879d0482444df3007609d57d3d6ad90.tar.xz
anaconda-fb7ad6522879d0482444df3007609d57d3d6ad90.zip
First crack at upgrade of systems with encrypted block devices. (#437604)
Diffstat (limited to 'upgrade.py')
-rw-r--r--upgrade.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/upgrade.py b/upgrade.py
index d95609d03..e4a425b5f 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -165,9 +165,7 @@ def findExistingRoots(anaconda, upgradeany = 0):
return []
anaconda.id.diskset.openDevices()
-
- if anaconda.rescue:
- anaconda.id.partitions.getEncryptedDevices(anaconda.id.diskset)
+ anaconda.id.partitions.getEncryptedDevices(anaconda.id.diskset)
rootparts = anaconda.id.diskset.findExistingRootPartitions(upgradeany = upgradeany)
# close the devices to make sure we don't leave things sitting open
@@ -193,18 +191,20 @@ def mountRootPartition(anaconda, rootInfo, oldfsset, allowDirty = 0,
(root, rootFs) = rootInfo
bindMount = 0
+ encryptedDevices = anaconda.id.partitions.encryptedDevices
diskset = partedUtils.DiskSet(anaconda)
diskset.openDevices()
+ for cryptoDev in encryptedDevices.values():
+ cryptoDev.openDevice()
diskset.startMPath()
diskset.startDmRaid()
diskset.startMdRaid()
+ for cryptoDev in encryptedDevices.values():
+ cryptoDev.openDevice()
lvm.vgscan()
lvm.vgactivate()
-
- try:
- encryptedDevices = anaconda.id.partitions.encryptedDevices
- except:
- encryptedDevices = {}
+ for cryptoDev in encryptedDevices.values():
+ cryptoDev.openDevice()
if root in anaconda.id.partitions.protectedPartitions() and os.path.ismount("/mnt/isodir"):
root = "/mnt/isodir"