Skip to content

Commit

Permalink
encrypt: recoverykey is now always slot #2
Browse files Browse the repository at this point in the history
  • Loading branch information
sysrich committed Jul 31, 2024
1 parent fdcc445 commit d013149
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usr/lib/tik/modules/post/15-encrypt
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ add_recoveryKey() {
echo "# Adding recovery key to ${cryptpart}" > ${encrypt_pipe}
log "[add_recoveryKey] adding recovery key to ${cryptpart}"
prun /usr/sbin/cryptsetup luksAddKey --key-file=${tik_keyfile} --batch-mode --force-password "${cryptpart}" <<<"${key}"
echo '{"type":"systemd-recovery","keyslots":["1"]}' | prun /usr/sbin/cryptsetup token import "${cryptpart}"
echo '{"type":"systemd-recovery","keyslots":["2"]}' | prun /usr/sbin/cryptsetup token import "${cryptpart}"
echo "100" > ${encrypt_pipe}
}

Expand Down

0 comments on commit d013149

Please sign in to comment.