Unless I'm missing something, is adding encrypted device support to kickstart as simple as the attached patch? I've already added the appropriate syntax bits to pykickstart. Does this end up behaving the same way the UI does, especially regarding handling missing passphrases? - Chris
diff --git a/kickstart.py b/kickstart.py index b648625..bc5d085 100644 --- a/kickstart.py +++ b/kickstart.py @@ -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.FC4_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.F7_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"])
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list