summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-07-15 10:17:38 -0500
committerDavid Lehman <dlehman@redhat.com>2009-07-21 17:36:12 -0500
commit9979a991bc5cd4718b6449997f5cab69982b5f5f (patch)
treeefc70bcb71adbd6089db9cecda5c4ad4b4ac8547 /storage
parent9c9008b4ef70da97991bfa4aa490ae1d10b5fea2 (diff)
downloadanaconda-9979a991bc5cd4718b6449997f5cab69982b5f5f.tar.gz
anaconda-9979a991bc5cd4718b6449997f5cab69982b5f5f.tar.xz
anaconda-9979a991bc5cd4718b6449997f5cab69982b5f5f.zip
Show locked LUKS devices as "Encrypted (LUKS)", not "LUKS".
Diffstat (limited to 'storage')
-rw-r--r--storage/formats/luks.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/storage/formats/luks.py b/storage/formats/luks.py
index 251e54d6a..c34868849 100644
--- a/storage/formats/luks.py
+++ b/storage/formats/luks.py
@@ -40,6 +40,7 @@ class LUKS(DeviceFormat):
""" A LUKS device. """
_type = "luks"
_name = "LUKS"
+ _lockedName = _("Encrypted")
_udevTypes = ["crypto_LUKS"]
_formattable = True # can be formatted
_supported = False # is supported
@@ -81,6 +82,16 @@ class LUKS(DeviceFormat):
elif not self.mapName and self.device:
self.mapName = "luks-%s" % os.path.basename(self.device)
+ @property
+ def name(self):
+ name = self._name
+ # for existing locked devices, show "Encrypted" instead of LUKS
+ if self.hasKey or not self.exists:
+ name = self._name
+ else:
+ name = "%s (%s)" % (self._lockedName, self._name)
+ return name
+
def _setPassphrase(self, passphrase):
""" Set the passphrase used to access this device. """
self.__passphrase = passphrase