summaryrefslogtreecommitdiffstats
path: root/kickstart.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-01-15 10:30:03 -0500
committerChris Lumens <clumens@redhat.com>2008-01-15 10:30:03 -0500
commit29065016815d63d01a69a2ef2c3fe7f28182ef3d (patch)
treefe64da69412e61b343ca6eaadae36623b3bc5b28 /kickstart.py
parentcc89a9a52f51d40a19799056567396a59541448f (diff)
downloadanaconda-29065016815d63d01a69a2ef2c3fe7f28182ef3d.tar.gz
anaconda-29065016815d63d01a69a2ef2c3fe7f28182ef3d.tar.xz
anaconda-29065016815d63d01a69a2ef2c3fe7f28182ef3d.zip
Initial kickstart support for encrypted partitions.
Diffstat (limited to 'kickstart.py')
-rw-r--r--kickstart.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/kickstart.py b/kickstart.py
index 6a70b95c4..6b5068355 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -130,7 +130,7 @@ class Authconfig(commands.authconfig.FC3_Authconfig):
commands.authconfig.FC3_Authconfig.parse(self, args)
self.handler.id.auth = self.authconfig
-class AutoPart(commands.autopart.FC3_AutoPart):
+class AutoPart(commands.autopart.F9_AutoPart):
def parse(self, args):
commands.autopart.FC3_AutoPart.parse(self, args)
@@ -138,6 +138,10 @@ class AutoPart(commands.autopart.FC3_AutoPart):
# if you want it
self.handler.id.instClass.setDefaultPartitioning(self.handler.id, doClear = 0)
+ if self.encrypted:
+ self.handler.id.partitions.autoEncrypt = True
+ self.handler.id.partitions.autoEncryptPass = self.passphrase
+
self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
class AutoStep(commands.autostep.FC3_AutoStep):
@@ -512,6 +516,9 @@ class Partition(commands.partition.F9_Partition):
if pd.fsopts != "":
request.fsopts = pd.fsopts
+ if pd.encrypted:
+ request.encryption = cryptodev.LUKSDevice(passphrase=pd.passphrase, format=pd.format)
+
addPartRequest(self.handler.anaconda, request)
self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])
@@ -586,6 +593,9 @@ class Raid(commands.raid.F9_Raid):
if rd.fsopts != "":
request.fsopts = rd.fsopts
+ if rd.encrypted:
+ request.encryption = cryptodev.LUKSDevice(passphrase=rd.passphrase, format=rd.format)
+
addPartRequest(self.handler.anaconda, request)
self.handler.skipSteps.extend(["partition", "zfcpconfig", "parttype"])