summaryrefslogtreecommitdiffstats
path: root/upgrade.py
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2008-02-20 12:23:10 -0600
committerDavid Lehman <dlehman@redhat.com>2008-02-20 12:28:06 -0600
commit39542b3283f23764fedd45b82eb67b23224f33f6 (patch)
tree25e424515a31183889452c215e8ca81b85417948 /upgrade.py
parent801ce9d275f7e404924f8f118d7724d554ae5d4f (diff)
downloadanaconda-39542b3283f23764fedd45b82eb67b23224f33f6.tar.gz
anaconda-39542b3283f23764fedd45b82eb67b23224f33f6.tar.xz
anaconda-39542b3283f23764fedd45b82eb67b23224f33f6.zip
Map preexisting encrypted devs before mounting everything in mountRootPartition.
Diffstat (limited to 'upgrade.py')
-rw-r--r--upgrade.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/upgrade.py b/upgrade.py
index 58731d877..22c89b79c 100644
--- a/upgrade.py
+++ b/upgrade.py
@@ -170,6 +170,11 @@ def mountRootPartition(anaconda, rootInfo, oldfsset, allowDirty = 0,
lvm.vgscan()
lvm.vgactivate()
+ try:
+ encryptedDevices = anaconda.id.partitions.encryptedDevices
+ except:
+ encryptedDevices = {}
+
if root in anaconda.id.partitions.protectedPartitions() and os.path.ismount("/mnt/isodir"):
root = "/mnt/isodir"
bindMount = 1
@@ -210,6 +215,10 @@ def mountRootPartition(anaconda, rootInfo, oldfsset, allowDirty = 0,
return -1
if flags.setupFilesystems:
+ for dev, crypto in encryptedDevices.items():
+ if crypto.openDevice():
+ log.error("failed to open encrypted device %s" % (dev,))
+
oldfsset.mountFilesystems(anaconda, readOnly = readOnly,
skiprootfs = bindMount)