[PATCH][rhel6-branch] Add missing pieces for kickstart encryption cipher option.
David Lehman
dlehman at redhat.com
Wed Oct 17 16:13:28 UTC 2012
Related: rhbz#838736
---
kickstart.py | 5 +++--
storage/__init__.py | 1 +
storage/formats/luks.py | 2 ++
storage/partitioning.py | 1 +
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/kickstart.py b/kickstart.py
index 32389a6..ec9ca90 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -234,7 +234,7 @@ class Authconfig(commands.authconfig.FC3_Authconfig):
def execute(self, anaconda):
anaconda.id.auth = self.authconfig
-class AutoPart(commands.autopart.F12_AutoPart):
+class AutoPart(commands.autopart.RHEL6_AutoPart):
def execute(self, anaconda):
# sets up default autopartitioning. use clearpart separately
# if you want it
@@ -244,6 +244,7 @@ class AutoPart(commands.autopart.F12_AutoPart):
if self.encrypted:
anaconda.id.storage.encryptedAutoPart = True
anaconda.id.storage.encryptionPassphrase = self.passphrase
+ anaconda.id.storage.encryptionCipher = self.cipher
anaconda.id.storage.autoPartEscrowCert = \
getEscrowCertificate(anaconda, self.escrowcert)
anaconda.id.storage.autoPartAddBackupPassphrase = \
@@ -930,7 +931,7 @@ class Reboot(commands.reboot.FC6_Reboot):
def execute(self, anaconda):
anaconda.id.ksdata.skipSteps.append("complete")
-class RaidData(commands.raid.F12_RaidData):
+class RaidData(commands.raid.RHEL6_RaidData):
def execute(self, anaconda):
raidmems = []
devicename = "md%d" % self.device
diff --git a/storage/__init__.py b/storage/__init__.py
index 805514c..cd70cfa 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -311,6 +311,7 @@ class Storage(object):
self.clearPartChoice = None
self.encryptedAutoPart = False
self.encryptionPassphrase = None
+ self.encryptionCipher = None
self.autoPartEscrowCert = None
self.autoPartAddBackupPassphrase = False
self.encryptionRetrofit = False
diff --git a/storage/formats/luks.py b/storage/formats/luks.py
index e16f5c6..5654376 100644
--- a/storage/formats/luks.py
+++ b/storage/formats/luks.py
@@ -109,6 +109,8 @@ class LUKS(DeviceFormat):
def writeKS(self, f):
f.write(" --encrypted")
+ if self.cipher:
+ f.write(" --cipher=\"%s\"" % self.cipher)
@property
def dict(self):
diff --git a/storage/partitioning.py b/storage/partitioning.py
index b038c23..e20a18f 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -68,6 +68,7 @@ def _createFreeSpacePartitions(anaconda):
if anaconda.id.storage.encryptedAutoPart:
fmt_type = "luks"
fmt_args = {"escrow_cert": anaconda.id.storage.autoPartEscrowCert,
+ "cipher": anaconda.id.storage.encryptionCipher,
"add_backup_passphrase": anaconda.id.storage.autoPartAddBackupPassphrase}
else:
fmt_type = "lvmpv"
--
1.7.6.5
More information about the anaconda-patches
mailing list