summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2008-10-20 12:52:54 -0500
committerDavid Lehman <dlehman@redhat.com>2008-10-20 12:58:32 -0500
commit0bd37a52693c76da0956e2b823fc64d22f1723bd (patch)
tree61194330bfea14a4135746d7e4f75ec7f4883b20
parent61c8db4c1a60930855d1bb2a73e629f9b6786159 (diff)
downloadanaconda-0bd37a52693c76da0956e2b823fc64d22f1723bd.tar.gz
anaconda-0bd37a52693c76da0956e2b823fc64d22f1723bd.tar.xz
anaconda-0bd37a52693c76da0956e2b823fc64d22f1723bd.zip
Improve LUKS devname fixup to handle devs containing "/". (related: 464769)
We only use the basename of the device in the mapping name.
-rw-r--r--bootloader.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bootloader.py b/bootloader.py
index fa207e48b..31bb9fa8d 100644
--- a/bootloader.py
+++ b/bootloader.py
@@ -143,6 +143,11 @@ def writeBootloader(anaconda):
if name is not None and name.startswith('mapper/luks-'):
try:
newname = anaconda.id.partitions.encryptedDevices.get(name[12:])
+ if newname is None:
+ for luksdev in anaconda.id.partitions.encryptedDevices.values():
+ if os.path.basename(luksdev.getDevice(encrypted=1)) == name[12:]:
+ newname = luksdev
+ break
name = newname.getDevice()
except:
pass