[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] Apply the global passphrase when doing kickstart autopart (#497533).



---
 storage/__init__.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/storage/__init__.py b/storage/__init__.py
index 8ef305c..08f4cbf 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -130,9 +130,6 @@ def storageComplete(anaconda):
             if passphrase:
                 anaconda.id.storage.encryptionPassphrase = passphrase
                 anaconda.id.storage.retrofitPassphrase = retrofit
-                for dev in anaconda.id.storage.devices:
-                    if dev.format.type == "luks" and not dev.format.exists:
-                        dev.format.passphrase = passphrase
                 break
             else:
                 rc = anaconda.intf.messageWindow(_("Encrypt device?"),
@@ -151,6 +148,11 @@ def storageComplete(anaconda):
                     anaconda.id.storage.encryptedAutoPart = False
                     break
 
+    if anaconda.id.storage.encryptionPassphrase:
+        for dev in anaconda.id.storage.devices:
+            if dev.format.type == "luks" and not dev.format.exists:
+                dev.format.passphrase = anaconda.id.storage.encryptionPassphrase
+
     if anaconda.isKickstart:
         return
 
-- 
1.6.1.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]