--- storage/formats/luks.py | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/storage/formats/luks.py b/storage/formats/luks.py index 251e54d..c348688 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 -- 1.6.0.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list