mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 02:45:44 -05:00
Only add LUKS keyfile if relevant, and with a 15s timeout.
This commit is contained in:
parent
fbe72b3663
commit
4488761a63
1 changed files with 6 additions and 3 deletions
|
@ -43,7 +43,8 @@ def run():
|
|||
if partition["mountPoint"] == "/" and "luksMapperName" in partition:
|
||||
luks_root_device = partition["device"]
|
||||
luks_root_passphrase = partition["luksPassphrase"]
|
||||
elif "luksMapperName" in partition:
|
||||
elif "luksMapperName" in partition and\
|
||||
(partition["mountPoint"] or partition["fs"] == "linuxswap"):
|
||||
additional_luks_devices.append((partition["device"],
|
||||
partition["luksPassphrase"]))
|
||||
|
||||
|
@ -65,14 +66,16 @@ def run():
|
|||
"luksAddKey",
|
||||
luks_root_device,
|
||||
"/crypto_keyfile.bin"],
|
||||
luks_root_passphrase)
|
||||
luks_root_passphrase,
|
||||
15) # timeout 15s
|
||||
|
||||
for additional_device in additional_luks_devices:
|
||||
check_target_env_call(["cryptsetup",
|
||||
"luksAddKey",
|
||||
additional_device[0],
|
||||
"/crypto_keyfile.bin"],
|
||||
additional_device[1])
|
||||
additional_device[1],
|
||||
15) # timeout 15s
|
||||
|
||||
check_target_env_call(["chmod",
|
||||
"g-rwx,o-rwx",
|
||||
|
|
Loading…
Add table
Reference in a new issue